Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface RAW_NS used previous a single TTCN3 port for a single UDP port (source/listen side). This has the limitation that only a single NSVC could be tested for a local UDP port. However SNS tests require multiple NSVCs over a single UDP port. NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation. Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use multiple NSVCs. Related: OS#5036 Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976 --- M fr-net/gen_links.sh M fr/gen_links.sh M gbproxy/gen_links.sh M library/NS_Provider_IPL4.ttcn M library/RAW_NS.ttcnpp M ns/gen_links.sh M pcu/gen_links.sh M sgsn/gen_links.sh 8 files changed, 106 insertions(+), 32 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/fr-net/gen_links.sh b/fr-net/gen_links.sh index 29f4399..413676c 100755 --- a/fr-net/gen_links.sh +++ b/fr-net/gen_links.sh @@ -47,7 +47,7 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn Osmocom_Types.ttcn " -FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp " +FILES+="RAW_NS.ttcnpp NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp " FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn " FILES+="LLC_Templates.ttcn " gen_links $DIR $FILES diff --git a/fr/gen_links.sh b/fr/gen_links.sh index 29f4399..413676c 100755 --- a/fr/gen_links.sh +++ b/fr/gen_links.sh @@ -47,7 +47,7 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn Osmocom_Types.ttcn " -FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp " +FILES+="RAW_NS.ttcnpp NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp " FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn " FILES+="LLC_Templates.ttcn " gen_links $DIR $FILES diff --git a/gbproxy/gen_links.sh b/gbproxy/gen_links.sh index d6bf22e..6d4ab81 100755 --- a/gbproxy/gen_links.sh +++ b/gbproxy/gen_links.sh @@ -84,7 +84,7 @@ DIR=../library FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn GSM_RR_Types.ttcn Osmocom_Types.ttcn RLCMAC_Templates.ttcn RLCMAC_Types.ttcn RLCMAC_CSN1_Templates.ttcn RLCMAC_CSN1_Types.ttcn RLCMAC_EncDec.cc " -FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp " +FILES+="RAW_NS.ttcnpp NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp " FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn " FILES+="PCUIF_Types.ttcn " FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn " diff --git a/library/NS_Provider_IPL4.ttcn b/library/NS_Provider_IPL4.ttcn index 774c08a..09e7dc0 100644 --- a/library/NS_Provider_IPL4.ttcn +++ b/library/NS_Provider_IPL4.ttcn @@ -27,6 +27,7 @@ import from Misc_Helpers all; import from NS_Emulation all; +import from RAW_NS all; import from NS_Types all; import from IPL4asp_Types all; @@ -42,6 +43,7 @@ /* per-NSVC ports and state */ port NS_PROVIDER_PT NSVC[NUM_MAX_NSVC]; + var boolean g_nsvc_bound[NUM_MAX_NSVC]; var PerNsvcState g_nsvc[NUM_MAX_NSVC]; /* management port via which */ @@ -54,31 +56,35 @@ NSVC_CT vc_nsvc }; -signature NSPIP_add_nsvc(charstring remote_ip, PortNumber remote_port, NSVC_CT vc_nsvc); -signature NSPIP_del_nsvc(charstring remote_ip, PortNumber remote_port); +signature NSPIP_add_nsvc(charstring remote_ip, PortNumber remote_port, NSVC_CT vc_nsvc) return integer; +signature NSPIP_del_nsvc(charstring remote_ip, PortNumber remote_port) return integer; type port NSPIP_PROC_PT procedure { inout NSPIP_add_nsvc, NSPIP_del_nsvc; } with { extension "internal" }; /* add a new NSVC to the provider */ -private function f_nsvc_add(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT +private function f_nsvc_add(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT return integer { for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) { - if (g_nsvc[i].vc_nsvc == null) { + if (g_nsvc_bound[i] == false) { g_nsvc[i] := nsvc; - connect(self:NSVC[i], nsvc.vc_nsvc:NSCP); - NSVC[i].send(NS_Provider_Evt:{link_status := NS_PROV_LINK_STATUS_UP}); - return; + g_nsvc_bound[i] := true; + if (isbound(nsvc.vc_nsvc) and nsvc.vc_nsvc != null) { + connect(self:NSVC[i], nsvc.vc_nsvc:NSCP); + NSVC[i].send(NS_Provider_Evt:{link_status :=
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 5: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/4/library/NS_Provider_IPL4.ttcn File library/NS_Provider_IPL4.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/4/library/NS_Provider_IPL4.ttcn@219 PS4, Line 219: f_nspip_add_nsvc2 > yes, because it runs on RAW_NS_CT and not on NS_CT Done -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 5 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Tue, 15 Jun 2021 20:20:37 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Comment-In-Reply-To: lynxis lazus Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 5 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Sun, 13 Jun 2021 18:10:49 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 4: (1 comment) https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/4/library/NS_Provider_IPL4.ttcn File library/NS_Provider_IPL4.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/4/library/NS_Provider_IPL4.ttcn@219 PS4, Line 219: f_nspip_add_nsvc2 > I'm a bit surprised we need this extra function. […] yes, because it runs on RAW_NS_CT and not on NS_CT -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 10 Jun 2021 16:49:21 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 4: Code-Review+1 (1 comment) fine with me, really just the minor question if we need a separate function for setting an argument to null. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/4/library/NS_Provider_IPL4.ttcn File library/NS_Provider_IPL4.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/4/library/NS_Provider_IPL4.ttcn@219 PS4, Line 219: f_nspip_add_nsvc2 I'm a bit surprised we need this extra function. Is it not legal to pass "null" as vc_nsvc argument to f_nsip_add_nsvc() ? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-Reviewer: laforge Gerrit-Comment-Date: Thu, 10 Jun 2021 12:50:03 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 4: Here is another solution which is just skipping the connect(). -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Sun, 06 Jun 2021 23:24:18 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
Hello Jenkins Builder, fixeria, daniel, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 to look at the new patch set (#4). Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface RAW_NS used previous a single TTCN3 port for a single UDP port (source/listen side). This has the limitation that only a single NSVC could be tested for a local UDP port. However SNS tests require multiple NSVCs over a single UDP port. NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation. Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use multiple NSVCs. Related: OS#5036 Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976 --- M fr-net/gen_links.sh M fr/gen_links.sh M gbproxy/gen_links.sh M library/NS_Provider_IPL4.ttcn M library/RAW_NS.ttcnpp M ns/gen_links.sh M pcu/gen_links.sh M sgsn/gen_links.sh 8 files changed, 106 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/24401/4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24593 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24593 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: I3fe097a879918e3446dba55767db1a5b5ed5212a Gerrit-Change-Number: 24593 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24593 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface RAW_NS used previous a single TTCN3 port for a single UDP port (source/listen side). This has the limitation that only a single NSVC could be tested for a local UDP port. However SNS tests require multiple NSVCs over a single UDP port. NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation. Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use multiple NSVCs. Related: OS#5036 Change-Id: I3fe097a879918e3446dba55767db1a5b5ed5212a --- M library/NS_Provider_IPL4.ttcn M library/RAW_NS.ttcnpp 2 files changed, 100 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/93/24593/1 diff --git a/library/NS_Provider_IPL4.ttcn b/library/NS_Provider_IPL4.ttcn index 774c08a..09e7dc0 100644 --- a/library/NS_Provider_IPL4.ttcn +++ b/library/NS_Provider_IPL4.ttcn @@ -27,6 +27,7 @@ import from Misc_Helpers all; import from NS_Emulation all; +import from RAW_NS all; import from NS_Types all; import from IPL4asp_Types all; @@ -42,6 +43,7 @@ /* per-NSVC ports and state */ port NS_PROVIDER_PT NSVC[NUM_MAX_NSVC]; + var boolean g_nsvc_bound[NUM_MAX_NSVC]; var PerNsvcState g_nsvc[NUM_MAX_NSVC]; /* management port via which */ @@ -54,31 +56,35 @@ NSVC_CT vc_nsvc }; -signature NSPIP_add_nsvc(charstring remote_ip, PortNumber remote_port, NSVC_CT vc_nsvc); -signature NSPIP_del_nsvc(charstring remote_ip, PortNumber remote_port); +signature NSPIP_add_nsvc(charstring remote_ip, PortNumber remote_port, NSVC_CT vc_nsvc) return integer; +signature NSPIP_del_nsvc(charstring remote_ip, PortNumber remote_port) return integer; type port NSPIP_PROC_PT procedure { inout NSPIP_add_nsvc, NSPIP_del_nsvc; } with { extension "internal" }; /* add a new NSVC to the provider */ -private function f_nsvc_add(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT +private function f_nsvc_add(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT return integer { for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) { - if (g_nsvc[i].vc_nsvc == null) { + if (g_nsvc_bound[i] == false) { g_nsvc[i] := nsvc; - connect(self:NSVC[i], nsvc.vc_nsvc:NSCP); - NSVC[i].send(NS_Provider_Evt:{link_status := NS_PROV_LINK_STATUS_UP}); - return; + g_nsvc_bound[i] := true; + if (isbound(nsvc.vc_nsvc) and nsvc.vc_nsvc != null) { + connect(self:NSVC[i], nsvc.vc_nsvc:NSCP); + NSVC[i].send(NS_Provider_Evt:{link_status := NS_PROV_LINK_STATUS_UP}); + } + return i; } } Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("Overflow of g_nsvc array")); + return -1; } -private function f_nsvc_del(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT +private function f_nsvc_del(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT return integer { for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) { - if (g_nsvc[i].vc_nsvc != null and + if (g_nsvc_bound[i] and g_nsvc[i].remote_ip == nsvc.remote_ip and g_nsvc[i].remote_port == nsvc.remote_port) { g_nsvc[i] := { @@ -86,19 +92,23 @@ remote_port := -, vc_nsvc := null } + g_nsvc_bound[i] := false; NSVC[i].send(NS_Provider_Evt:{link_status := NS_PROV_LINK_STATUS_DOWN}); - disconnect(self:NSVC[i], nsvc.vc_nsvc:NSCP); - return; + if (isbound(g_nsvc[i].vc_nsvc) and g_nsvc[i].vc_nsvc != null) { + disconnect(self:NSVC[i], nsvc.vc_nsvc:NSCP); + } + return i; } } Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, log2str("attempt to delete unknown NSVC")); + return -1; } private function f_get_nsvc_idx(charstring remote_ip, PortNumber remote_port) runs on NS_Provider_IPL4_CT return integer { for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) { - if (g_nsvc[i].vc_nsvc != null and + if (g_nsvc_bound[i] and g_nsvc[i].remote_ip == remote_ip and g_nsvc[i].remote_port == remote_port) { return i; } @@ -109,6 +119,7 @@ function main(NSVCConfiguration config, NSConfiguration
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: > Patch Set 2: > > > Patch Set 2: > > > > > Patch Set 2: > > > > > > > Patch Set 2: > > > > > > > > isn't it possible to pass a port reference (rather than a component > > > > reference) around? if that is possible, the consumer could pass a port > > > > reference to the provider, and the provider wouldn't have to know > > > > anything about the type of the consumer component type and whether it > > > > uses a port array, an index, etc. > > > > > > We do pass a port reference in BSC_Tests.ttcn, check f_logp() or > > > f_vty_msc_allow_attach(). > > > > thanks! I'll try it out > > It didn't worked out that way because ports can't be put into record, but > into functions. > It didn't worked out that way because ports can't be put into record, but > into functions. I think an acceptable solution for this is connecting the port from outside instead from within NS_Prover_IPv4 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Sat, 05 Jun 2021 16:09:10 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: > Patch Set 2: > > > Patch Set 2: > > > > > Patch Set 2: > > > > > > isn't it possible to pass a port reference (rather than a component > > > reference) around? if that is possible, the consumer could pass a port > > > reference to the provider, and the provider wouldn't have to know > > > anything about the type of the consumer component type and whether it > > > uses a port array, an index, etc. > > > > We do pass a port reference in BSC_Tests.ttcn, check f_logp() or > > f_vty_msc_allow_attach(). > > thanks! I'll try it out It didn't worked out that way because ports can't be put into record, but into functions. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 31 May 2021 20:08:01 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: > > We do pass a port reference in BSC_Tests.ttcn, check f_logp() or > > f_vty_msc_allow_attach(). > > thanks! I'll try it out Passing port references a s function parameters works. I think the potential difficulty will arise when passing a port reference through a procedure port into another component (e.g. to register it). I am almost convinced that won't work. If I remmber correctly, only the component references can be passed, as those are really just some kind of "process id" :/ -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 31 May 2021 19:06:46 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: > Patch Set 2: > > > Patch Set 2: > > > > isn't it possible to pass a port reference (rather than a component > > reference) around? if that is possible, the consumer could pass a port > > reference to the provider, and the provider wouldn't have to know anything > > about the type of the consumer component type and whether it uses a port > > array, an index, etc. > > We do pass a port reference in BSC_Tests.ttcn, check f_logp() or > f_vty_msc_allow_attach(). thanks! I'll try it out -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Mon, 31 May 2021 14:42:07 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: > Patch Set 2: > > isn't it possible to pass a port reference (rather than a component > reference) around? if that is possible, the consumer could pass a port > reference to the provider, and the provider wouldn't have to know anything > about the type of the consumer component type and whether it uses a port > array, an index, etc. We do pass a port reference in BSC_Tests.ttcn, check f_logp() or f_vty_msc_allow_attach(). -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Sun, 30 May 2021 21:39:18 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: > Patch Set 2: > > (3 comments) > > to be honest, I'm overall not very convinced by this patch. It looks more > like a kludge/hack than a proper solution. > > In general, we should try to keep code as generic as possible and not include > too many special use cases. If there is a common way to interface the > NS_Provider with its consumer, then we should go for that rather than > supporting two different ways. > > Ideally we also wouldn't have a new un-conditional dependency to NS_RAW from > the NS_Provider_IPL4. If it's absolutely neccessary, one c ould think of > #ifdef'ing it out and using ttcnpp, like we e.g. do in IPA_Emulation to avoid > extra dependencies that otherwise are not there. > > Without spending more time on thinking about this in detail, I don't > immediately have a better solution, but I think there should be some way to > have a general interface betwene the provider and the consumer, without > special-casing between the two existing consumers. I agree this is very dirty. Ack on using a union, but maybe there is a better solution. Having a reference would be much better. I'm not sure about port references. I tried a little bit using that way but didn't worked out. Not sure if it's possible, but create a new component and derive RAW_NS/Emulation from it? -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Reviewer: fixeria Gerrit-CC: laforge Gerrit-Comment-Date: Sun, 30 May 2021 18:35:13 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: isn't it possible to pass a port reference (rather than a component reference) around? if that is possible, the consumer could pass a port reference to the provider, and the provider wouldn't have to know anything about the type of the consumer component type and whether it uses a port array, an index, etc. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-CC: laforge Gerrit-Comment-Date: Sun, 30 May 2021 09:33:41 + Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: (3 comments) to be honest, I'm overall not very convinced by this patch. It looks more like a kludge/hack than a proper solution. In general, we should try to keep code as generic as possible and not include too many special use cases. If there is a common way to interface the NS_Provider with its consumer, then we should go for that rather than supporting two different ways. Ideally we also wouldn't have a new un-conditional dependency to NS_RAW from the NS_Provider_IPL4. If it's absolutely neccessary, one c ould think of #ifdef'ing it out and using ttcnpp, like we e.g. do in IPA_Emulation to avoid extra dependencies that otherwise are not there. Without spending more time on thinking about this in detail, I don't immediately have a better solution, but I think there should be some way to have a general interface betwene the provider and the consumer, without special-casing between the two existing consumers. https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/2/library/NS_Provider_IPL4.ttcn File library/NS_Provider_IPL4.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/2/library/NS_Provider_IPL4.ttcn@57 PS2, Line 57: integer vc_raw_idx as those two are mutually exclusive, one could introduce a union here to show those are two mutually excluded alternatives code can then use ischosen() to determine if either of the union alternatives has been selected or not (rather than checking for a component reference being null). https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/2/library/NS_Provider_IPL4.ttcn@60 PS2, Line 60: sig AFAICT, adding the raw NSVC is really different from the "normal" one, so it might make sense to keep the old signature as-is and add a second NSPIP_add_nsvc_raw() https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/2/library/NS_Provider_IPL4.ttcn@76 PS2, Line 76: connect(self:NSVC[i], nsvc.vc_raw:NSCP[nsvc.vc_raw_idx]); so the only difference between those two is that one has an array, and the other has not? this needs more thought. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-CC: laforge Gerrit-Comment-Date: Sun, 30 May 2021 09:31:42 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Comment-Date: Fri, 28 May 2021 16:04:56 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
Hello Jenkins Builder, daniel, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 to look at the new patch set (#2). Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface RAW_NS used previous a single TTCN3 port for a single UDP port (source/listen side). This has the limitation that only a single NSVC could be tested for a local UDP port. However SNS tests require multiple NSVCs over a single UDP port. NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation. Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use multiple NSVCs. Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976 --- M fr-net/gen_links.sh M fr/gen_links.sh M gbproxy/gen_links.sh M library/NS_Provider_IPL4.ttcn M library/RAW_NS.ttcnpp M ns/gen_links.sh M pcu/gen_links.sh M sgsn/gen_links.sh 8 files changed, 98 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/24401/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-MessageType: newpatchset
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 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: Iafd9310e04066958914201da0cbdcd563bd5c976 Gerrit-Change-Number: 24401 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-Comment-Date: Fri, 28 May 2021 15:51:19 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
Change in osmo-ttcn3-hacks[master]: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401 ) Change subject: RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface .. RAW_NS/NS_Provider_IPL4: allow to use the new NSVC interface RAW_NS used previous a single TTCN3 port for a single UDP port (source/listen side). This has the limitation that only a single NSVC could be tested for a local UDP port. However SNS tests require multiple NSVCs over a single UDP port. NS_Provider_IPL4 already supports multiple NSVCs for the NS_Emulation. Extend the support in NS_Provider_IPL4 to also allow RAW_NS to use multiple NSVCs. Change-Id: Iafd9310e04066958914201da0cbdcd563bd5c976 --- M library/NS_Provider_IPL4.ttcn M library/RAW_NS.ttcnpp 2 files changed, 92 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/01/24401/1 diff --git a/library/NS_Provider_IPL4.ttcn b/library/NS_Provider_IPL4.ttcn index 774c08a..31ad351 100644 --- a/library/NS_Provider_IPL4.ttcn +++ b/library/NS_Provider_IPL4.ttcn @@ -28,6 +28,7 @@ import from Misc_Helpers all; import from NS_Emulation all; import from NS_Types all; +import from RAW_NS all; import from IPL4asp_Types all; import from IPL4asp_PortType all; @@ -51,10 +52,12 @@ type record PerNsvcState { charstring remote_ip, PortNumber remote_port, - NSVC_CT vc_nsvc + NSVC_CT vc_nsvc, + RAW_NS_CT vc_raw, + integer vc_raw_idx }; -signature NSPIP_add_nsvc(charstring remote_ip, PortNumber remote_port, NSVC_CT vc_nsvc); +signature NSPIP_add_nsvc(charstring remote_ip, PortNumber remote_port, NSVC_CT vc_nsvc, RAW_NS_CT vc_raw, integer vc_raw_idx); signature NSPIP_del_nsvc(charstring remote_ip, PortNumber remote_port); type port NSPIP_PROC_PT procedure { @@ -65,9 +68,13 @@ private function f_nsvc_add(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT { for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) { - if (g_nsvc[i].vc_nsvc == null) { + if (g_nsvc[i].vc_nsvc == null and g_nsvc[i].vc_raw == null) { g_nsvc[i] := nsvc; - connect(self:NSVC[i], nsvc.vc_nsvc:NSCP); + if (g_nsvc[i].vc_nsvc != null) { + connect(self:NSVC[i], nsvc.vc_nsvc:NSCP); + } else { + connect(self:NSVC[i], nsvc.vc_raw:NSCP[nsvc.vc_raw_idx]); + } NSVC[i].send(NS_Provider_Evt:{link_status := NS_PROV_LINK_STATUS_UP}); return; } @@ -78,16 +85,22 @@ private function f_nsvc_del(PerNsvcState nsvc) runs on NS_Provider_IPL4_CT { for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) { - if (g_nsvc[i].vc_nsvc != null and + if ((g_nsvc[i].vc_nsvc != null or g_nsvc[i].vc_raw != null) and g_nsvc[i].remote_ip == nsvc.remote_ip and g_nsvc[i].remote_port == nsvc.remote_port) { g_nsvc[i] := { remote_ip := -, remote_port := -, - vc_nsvc := null + vc_nsvc := null, + vc_raw := null, + vc_raw_idx := -1 } NSVC[i].send(NS_Provider_Evt:{link_status := NS_PROV_LINK_STATUS_DOWN}); - disconnect(self:NSVC[i], nsvc.vc_nsvc:NSCP); + if (nsvc.vc_nsvc != null) { + disconnect(self:NSVC[i], nsvc.vc_nsvc:NSCP); + } else { + disconnect(self:NSVC[i], nsvc.vc_raw:NSCP[nsvc.vc_raw_idx]); + } return; } } @@ -98,7 +111,7 @@ runs on NS_Provider_IPL4_CT return integer { for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) { - if (g_nsvc[i].vc_nsvc != null and + if ((g_nsvc[i].vc_nsvc != null or g_nsvc[i].vc_raw != null) and g_nsvc[i].remote_ip == remote_ip and g_nsvc[i].remote_port == remote_port) { return i; } @@ -109,6 +122,7 @@ function main(NSVCConfiguration config, NSConfiguration nsconfig, charstring id) runs on NS_Provider_IPL4_CT { for (var integer i := 0; i < sizeof(g_nsvc); i := i+1) { g_nsvc[i].vc_nsvc := null; + g_nsvc[i].vc_raw := null; } /* in order to support any number of NSVC on this endpoiint, we only bind the socket @@ -134,6 +148,8 @@ var charstring remote_ip; var PortNumber remote_port; var NSVC_CT vc_nsvc; + var RAW_NS_CT vc_raw; + var integer vc_raw_idx; var