pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/upf-benchmark/+/39467?usp=email )
Change subject: Move new TRex based setup to its own gtplan-sysmo2025 dir
......................................................................
Move new TRex based setup to its own gtplan-sysmo2025 dir
Some documentation regardins the setups is added/improved.
Change-Id: Ia5adb2826c30a0a4c02b091e9907e48c309ebf05
---
A testsuites/gtplab-sysmo2017/README.md
A testsuites/gtplab-sysmo2017/setup.dot
D testsuites/gtplab-sysmo2017/trex-tunmap/README.md
A testsuites/gtplab-sysmo2025/README.md
A testsuites/gtplab-sysmo2025/setup.dot
A testsuites/gtplab-sysmo2025/tunmap/README.md
R testsuites/gtplab-sysmo2025/tunmap/cpf/0.gtp_flood.vty
R testsuites/gtplab-sysmo2025/tunmap/cpf/configure.sh
R testsuites/gtplab-sysmo2025/tunmap/cpf/osmo-upf-load-gen.cfg
R testsuites/gtplab-sysmo2025/tunmap/cpf/run.sh
R testsuites/gtplab-sysmo2025/tunmap/trex/configure.sh
R testsuites/gtplab-sysmo2025/tunmap/trex/gtp_1pkt_simple.py
R testsuites/gtplab-sysmo2025/tunmap/trex/run.sh
R testsuites/gtplab-sysmo2025/tunmap/trex/trex_cfg.yaml
R testsuites/gtplab-sysmo2025/tunmap/upf/configure.sh
R testsuites/gtplab-sysmo2025/tunmap/upf/eupf/eupf.yaml
R testsuites/gtplab-sysmo2025/tunmap/upf/eupf/run.sh
R testsuites/gtplab-sysmo2025/tunmap/upf/osmo-upf/osmo-upf.cfg
R testsuites/gtplab-sysmo2025/tunmap/upf/osmo-upf/run.sh
19 files changed, 114 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/upf-benchmark refs/changes/67/39467/1
diff --git a/testsuites/gtplab-sysmo2017/README.md b/testsuites/gtplab-sysmo2017/README.md
new file mode 100644
index 0000000..49bb4f2
--- /dev/null
+++ b/testsuites/gtplab-sysmo2017/README.md
@@ -0,0 +1,3 @@
+This directory contains test scenarios (tunmap, tunend) run on a setup which consists out of 3 identical machines, each with a dualport mellanox network card and 100ge cables to the next machine.
+
+See setup.dot in this same directory to understand better the general topology.
\ No newline at end of file
diff --git a/testsuites/gtplab-sysmo2017/setup.dot b/testsuites/gtplab-sysmo2017/setup.dot
new file mode 100644
index 0000000..4a67ef3
--- /dev/null
+++ b/testsuites/gtplab-sysmo2017/setup.dot
@@ -0,0 +1,40 @@
+digraph G {
+ rankdir=TB;
+ labelloc=t;
+ label="gtplab @ sysmocom";
+
+ subgraph cluster_gtplab0 {
+ label="gtplab0";
+ rankdir=TB;
+ gtplab0_ipmi [label="ipmi\n10.9.23.50/24\nac:1f:6b:4a:78:d2\nBMC/ipmi\ndhcpc"];
+ gtplab0_eno1 [label="eno1\n10.9.25.20/24\nac:1f:6b:45:1b:04\nOOB access\ndhcpc"];
+ gtplab0_eno2 [label="eno2\nac:1f:6b:45:1b:05\nunused"];
+ gtplab0_enp2s0f0np0 [label="enp2s0f0np0\n172.16.31.1/24\nec:0d:9a:8a:28:12\nstatic "];
+ gtplab0_enp2s0f1np1 [label="enp2s0f1np1\nec:0d:9a:8a:28:13\nunused "];
+ }
+ subgraph cluster_gtplab1 {
+ label="gtplab1";
+ gtplab1_ipmi [label="ipmi\n10.9.23.51/24\nac:1f:6b:4a:79:84\nBMC/ipmi\ndhcpc"];
+ gtplab1_eno1 [label="eno1\n10.9.25.21/24\nac:1f:6b:45:1c:68\nOOB access\ndhcpc"];
+ gtplab1_eno2 [label="eno2\nac:1f:6b:45:1c:69\nunused"];
+ gtplab1_enp2s0f0np0 [label="enp2s0f0np0\n172.16.31.2/24\nec:0d:9a:8a:28:1a\n100gb link\nstatic "];
+ gtplab1_enp2s0f1np1 [label="enp2s0f1np1\n172.16.32.1/24\nec:0d:9a:8a:28:1b\n100gb link\nstatic "];
+ }
+ subgraph cluster_gtplab2 {
+ label="gtplab2";
+ gtplab2_ipmi [label="ipmi\n10.9.23.52/24\nac:1f:6b:4a:77:cd\nBMC/ipmi\ndhcpc"];
+ gtplab2_eno1 [label="eno1\n10.9.25.22/24\nac:1f:6b:45:18:fe\nOOB access\ndhcpc"];
+ gtplab2_eno2 [label="eno2\nac:1f:6b:45:18:ff\nunused"];
+ gtplab2_enp2s0f0np0 [label="enp2s0f0np0\n172.16.32.2/24\nec:0d:9a:8a:27:52\nstatic "];
+ gtplab2_enp2s0f1np1 [label="enp2s0f1np1\nec:0d:9a:8a:27:53\nunused"];
+ }
+
+ switch -> gtplab0_ipmi [constraint=false,dir=both];
+ switch -> gtplab0_eno1 [constraint=false,dir=both];
+ switch -> gtplab1_ipmi [constraint=false,dir=both];
+ switch -> gtplab1_eno1 [constraint=false,dir=both];
+ switch -> gtplab2_ipmi [constraint=false,dir=both];
+ switch -> gtplab2_eno1 [constraint=false,dir=both];
+ gtplab0_enp2s0f0np0 -> gtplab1_enp2s0f0np0 [label="100gb",dir=both,style=bold];
+ gtplab1_enp2s0f1np1 -> gtplab2_enp2s0f0np0 [label="100gb",dir=both,style=bold];
+}
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/README.md b/testsuites/gtplab-sysmo2017/trex-tunmap/README.md
deleted file mode 100644
index 17102e4..0000000
--- a/testsuites/gtplab-sysmo2017/trex-tunmap/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-----
-[ran](172.16.31.1) ----GTPU--> ()[upf]
- |
-[cn](172.16.31.100) <--GTPU--- ()[upf]
-----
\ No newline at end of file
diff --git a/testsuites/gtplab-sysmo2025/README.md b/testsuites/gtplab-sysmo2025/README.md
new file mode 100644
index 0000000..f6c6221
--- /dev/null
+++ b/testsuites/gtplab-sysmo2025/README.md
@@ -0,0 +1,17 @@
+This directory contains test scenarios (tunmap, tunend) run on a setup which consists out of 3 machines, all of them are inter-connected via a Mellanox SN2700 32x 100GE switch.
+
+Machines:
+* TRex: This machine runs TRex to generate/consume traffic emulating both RAN
+ and CN around the UPF.
+* UPF: This machine runs the UPF under test, be it osmo-upf, eupf, etc.
+* CPF: This machine runs the userspace program in charge of setting up the UPF
+ sessions over PFCP, hence acting as a CPF. It runs osmo-upf-load-gen tool from
+ this same repository.
+
+The CPF could actually also be run eg. at TRex machine and route PFCP traffic
+over the external network towards UPF. Note it cannot easily use the network
+interfaces (internal network) used to transmit GTPU, since those are controlled
+by TRex and not by the linux kernel, hence why CPF is simply placed in another
+machine.
+
+See setup.dot in this same directory to understand better the general topology.
\ No newline at end of file
diff --git a/testsuites/gtplab-sysmo2025/setup.dot b/testsuites/gtplab-sysmo2025/setup.dot
new file mode 100644
index 0000000..d3a7a14
--- /dev/null
+++ b/testsuites/gtplab-sysmo2025/setup.dot
@@ -0,0 +1,49 @@
+digraph G {
+ rankdir=TB;
+ labelloc=t;
+ label="gtplab @ sysmocom";
+
+ subgraph cluster_trex {
+ label="TRex (gtplab2)";
+ rankdir=TB;
+ trex_ipmi [label="ipmi\n10.9.23.52/24\nac:1f:6b:4a:77:cd\nBMC/ipmi\ndhcpc"];
+ trex_eno1 [label="eno1\n10.9.25.22/24\nac:1f:6b:45:18:fe\nOOB access\ndhcpc"];
+ trex_eno2 [label="eno2\nac:1f:6b:45:18:ff\nunused"];
+ trex_enp2s0f0np0 [label="enp2s0f0np0\n172.16.32.2/24\nec:0d:9a:8a:27:52\nstatic (TRex)"];
+ trex_enp2s0f1np1 [label="enp2s0f1np1\n172.16.31.200\nec:0d:9a:8a:27:53\nstatic (TRex)"];
+ }
+ subgraph cluster_upf {
+ label="UPF (gtplab1)";
+ upf_ipmi [label="ipmi\n10.9.23.51/24\nac:1f:6b:4a:79:84\nBMC/ipmi\ndhcpc"];
+ upf_eno1 [label="eno1\n10.9.25.21/24\nac:1f:6b:45:1c:68\nOOB access\ndhcpc"];
+ upf_eno2 [label="eno2\nac:1f:6b:45:1c:69\nunused"];
+ upf_enp2s0f0np0 [label="enp2s0f0np0\n172.16.31.2/24\nec:0d:9a:8a:28:1a\n100gb link\nstatic "];
+ upf_enp2s0f1np1 [label="enp2s0f1np1\n172.16.32.1/24\nec:0d:9a:8a:28:1b\n100gb link\nstatic "];
+ }
+ subgraph cluster_test_switch {
+ label="Test Switch (100gb)";
+ test_switch_vlan1 [label="vlan1 (RAN)"];
+ test_switch_vlan2 [label="vlan2 (CN)"];
+ }
+ subgraph cluster_cpf {
+ label="CPF (gtplab0)";
+ cpf_ipmi [label="ipmi\n10.9.23.50/24\nac:1f:6b:4a:78:d2\nBMC/ipmi\ndhcpc"];
+ cpf_eno1 [label="eno1\n10.9.25.20/24\nac:1f:6b:45:1b:04\nOOB access\ndhcpc"];
+ cpf_eno2 [label="eno2\nac:1f:6b:45:1b:05\nunused"];
+ cpf_enp2s0f0np0 [label="enp2s0f0np0\n172.16.31.1/24\nec:0d:9a:8a:28:12\nstatic "];
+ cpf_enp2s0f1np1 [label="enp2s0f1np1\nec:0d:9a:8a:28:13\nunused "];
+ }
+
+ trex_enp2s0f0np0 -> test_switch_vlan1 [label="RAN 100gb",dir=both,style=bold];
+ trex_enp2s0f1np1 -> test_switch_vlan2 [label="CN 100gb",dir=both,style=bold];
+ upf_enp2s0f0np0 -> test_switch_vlan2 [label="CN 100gb",dir=both,style=bold];
+ upf_enp2s0f1np1 -> test_switch_vlan1 [label="RAN 100gb",dir=both,style=bold];
+ cpf_enp2s0f0np0 -> test_switch_vlan1 [label="PFCP (100gb)",dir=both,style=bold];
+
+ switch -> cpf_ipmi [constraint=false,dir=both];
+ switch -> cpf_eno1 [constraint=false,dir=both];
+ switch -> upf_ipmi [constraint=false,dir=both];
+ switch -> upf_eno1 [constraint=false,dir=both];
+ switch -> trex_ipmi [constraint=false,dir=both];
+ switch -> trex_eno1 [constraint=false,dir=both];
+}
diff --git a/testsuites/gtplab-sysmo2025/tunmap/README.md b/testsuites/gtplab-sysmo2025/tunmap/README.md
new file mode 100644
index 0000000..d10b5dd
--- /dev/null
+++ b/testsuites/gtplab-sysmo2025/tunmap/README.md
@@ -0,0 +1,5 @@
+----
+[ran](172.16.32.2) ----GTPU--> ()[upf]
+ |
+[cn](172.16.31.2) <--GTPU---- ()[upf]
+----
\ No newline at end of file
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/smf/0.gtp_flood.vty b/testsuites/gtplab-sysmo2025/tunmap/cpf/0.gtp_flood.vty
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/smf/0.gtp_flood.vty
rename to testsuites/gtplab-sysmo2025/tunmap/cpf/0.gtp_flood.vty
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/smf/configure.sh b/testsuites/gtplab-sysmo2025/tunmap/cpf/configure.sh
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/smf/configure.sh
rename to testsuites/gtplab-sysmo2025/tunmap/cpf/configure.sh
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/smf/osmo-upf-load-gen.cfg b/testsuites/gtplab-sysmo2025/tunmap/cpf/osmo-upf-load-gen.cfg
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/smf/osmo-upf-load-gen.cfg
rename to testsuites/gtplab-sysmo2025/tunmap/cpf/osmo-upf-load-gen.cfg
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/smf/run.sh b/testsuites/gtplab-sysmo2025/tunmap/cpf/run.sh
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/smf/run.sh
rename to testsuites/gtplab-sysmo2025/tunmap/cpf/run.sh
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/trex/configure.sh b/testsuites/gtplab-sysmo2025/tunmap/trex/configure.sh
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/trex/configure.sh
rename to testsuites/gtplab-sysmo2025/tunmap/trex/configure.sh
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/trex/gtp_1pkt_simple.py b/testsuites/gtplab-sysmo2025/tunmap/trex/gtp_1pkt_simple.py
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/trex/gtp_1pkt_simple.py
rename to testsuites/gtplab-sysmo2025/tunmap/trex/gtp_1pkt_simple.py
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/trex/run.sh b/testsuites/gtplab-sysmo2025/tunmap/trex/run.sh
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/trex/run.sh
rename to testsuites/gtplab-sysmo2025/tunmap/trex/run.sh
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/trex/trex_cfg.yaml b/testsuites/gtplab-sysmo2025/tunmap/trex/trex_cfg.yaml
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/trex/trex_cfg.yaml
rename to testsuites/gtplab-sysmo2025/tunmap/trex/trex_cfg.yaml
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/configure.sh b/testsuites/gtplab-sysmo2025/tunmap/upf/configure.sh
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/upf/configure.sh
rename to testsuites/gtplab-sysmo2025/tunmap/upf/configure.sh
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/eupf.yaml b/testsuites/gtplab-sysmo2025/tunmap/upf/eupf/eupf.yaml
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/eupf.yaml
rename to testsuites/gtplab-sysmo2025/tunmap/upf/eupf/eupf.yaml
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/run.sh b/testsuites/gtplab-sysmo2025/tunmap/upf/eupf/run.sh
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/run.sh
rename to testsuites/gtplab-sysmo2025/tunmap/upf/eupf/run.sh
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/osmo-upf.cfg b/testsuites/gtplab-sysmo2025/tunmap/upf/osmo-upf/osmo-upf.cfg
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/osmo-upf.cfg
rename to testsuites/gtplab-sysmo2025/tunmap/upf/osmo-upf/osmo-upf.cfg
diff --git a/testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/run.sh b/testsuites/gtplab-sysmo2025/tunmap/upf/osmo-upf/run.sh
similarity index 100%
rename from testsuites/gtplab-sysmo2017/trex-tunmap/upf/osmo-upf/run.sh
rename to testsuites/gtplab-sysmo2025/tunmap/upf/osmo-upf/run.sh
--
To view, visit https://gerrit.osmocom.org/c/upf-benchmark/+/39467?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: upf-benchmark
Gerrit-Branch: master
Gerrit-Change-Id: Ia5adb2826c30a0a4c02b091e9907e48c309ebf05
Gerrit-Change-Number: 39467
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: csaba.sipos, fixeria, laforge.
pespin has posted comments on this change by csaba.sipos. ( https://gerrit.osmocom.org/c/osmo-bsc/+/39416?usp=email )
Change subject: nokia_site: Add object_identity, object_state and object_identity_state attributes
......................................................................
Patch Set 9:
(3 comments)
Patchset:
PS9:
I'm sorry to keep delaying merge of this, but I ask for simpel changes sometimes and then new version seems to have changed substantially again from last version..
File src/osmo-bsc/bts_nokia_site.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/39416/comment/f6d8f8dc_f44bfee2?usp… :
PS9, Line 1857: if (find_element(noh->data, len_data, NOKIA_EI_OBJ_ID, object_identity, sizeof(object_identity)) != sizeof(object_identity) ||
This is now tons of lines >120 chars (the maximum as per osmocom guidelines) and becomes unreadable when looking at diffs.
Also, it's really really hard to follow on this since it's full of several levels of if/else everywhere.
https://gerrit.osmocom.org/c/osmo-bsc/+/39416/comment/7bdbe075_0c197e56?usp… :
PS9, Line 1858: find_element(noh->data, len_data, NOKIA_EI_OBJ_STATE, &object_state, sizeof(object_state)) != sizeof(object_state)) {
this is not properly aligned to the line above.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/39416?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Id9f819b0649ba3c247db72d7d738e49c72388dc3
Gerrit-Change-Number: 39416
Gerrit-PatchSet: 9
Gerrit-Owner: csaba.sipos <metro4(a)freemail.hu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: csaba.sipos <metro4(a)freemail.hu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 05 Feb 2025 13:23:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/upf-benchmark/+/39465?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: trex-tunmap: Initial working eupf setup
......................................................................
trex-tunmap: Initial working eupf setup
Change-Id: I077623f679d8ca74ca81a1f6fd5fe58e0a019d8f
---
M testsuites/gtplab-sysmo2017/trex-tunmap/upf/eupf/eupf.yaml
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/upf-benchmark refs/changes/65/39465/2
--
To view, visit https://gerrit.osmocom.org/c/upf-benchmark/+/39465?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: upf-benchmark
Gerrit-Branch: master
Gerrit-Change-Id: I077623f679d8ca74ca81a1f6fd5fe58e0a019d8f
Gerrit-Change-Number: 39465
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/39456?usp=email )
Change subject: Use hashtable to look up req/resp by seq_nr
......................................................................
Use hashtable to look up req/resp by seq_nr
The list of requests/responses may grow quite a lot on busy instances.
Related: SYS#6398
Change-Id: I1b7138206ed035bed3d266f713ce1dd62cbe7286
---
M src/libosmo-pfcp/pfcp_endpoint.c
1 file changed, 39 insertions(+), 17 deletions(-)
Approvals:
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/libosmo-pfcp/pfcp_endpoint.c b/src/libosmo-pfcp/pfcp_endpoint.c
index 7e08d8e..e2b25d4 100644
--- a/src/libosmo-pfcp/pfcp_endpoint.c
+++ b/src/libosmo-pfcp/pfcp_endpoint.c
@@ -28,6 +28,8 @@
#include <osmocom/core/talloc.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/tdef.h>
+#include <osmocom/core/linuxlist.h>
+#include <osmocom/core/hashtable.h>
#include <osmocom/pfcp/pfcp_endpoint.h>
#include <osmocom/pfcp/pfcp_msg.h>
@@ -49,16 +51,20 @@
* For a transmitted Request message, wait for a matching Response from a remote peer; if none arrives,
* retransmit (see n1 and t1_ms). */
struct llist_head sent_requests;
+ DECLARE_HASHTABLE(sent_requests_by_seq_nr, 10);
/* All transmitted PFCP Response messages, list of osmo_pfcp_queue_entry.
* For a transmitted Response message, keep it in the queue for a fixed amount of time. If the peer retransmits
* the original Request, do not dispatch the Request, but respond with the queued message directly. */
struct llist_head sent_responses;
+ DECLARE_HASHTABLE(sent_responses_by_seq_nr, 10);
};
/*! Entry of pfcp_endpoint message queue of PFCP messages, for re-transsions. */
struct osmo_pfcp_queue_entry {
/* entry in osmo_pfcp_endpoint.sent_requests or .sent_responses */
struct llist_head entry;
+ /* item in osmo_pfcp_endpoint's sent_responses_by_seq_nr or sent_responses_by_seq_nr */
+ struct hlist_node node_by_seq_nr;
/* back-pointer */
struct osmo_pfcp_endpoint *ep;
/* message we have transmitted */
@@ -70,22 +76,6 @@
unsigned int n1_remaining;
};
-/* Find a matching osmo_pfcp_queue_entry for given rx.
- * A returned osmo_pfcp_queue_entry is guaranteed to be a Response if rx is a Request, and vice versa. */
-static struct osmo_pfcp_queue_entry *osmo_pfcp_queue_find(struct llist_head *queue, const struct osmo_pfcp_msg *rx)
-{
- struct osmo_pfcp_queue_entry *qe;
- /* It's important to match only a Request to a Response and vice versa, because the remote peer makes its own
- * sequence_nr. There could be a collision of sequence_nr. But as long as all Requests look for a Response and
- * vice versa, the sequence_nr scopes don't overlap. */
- llist_for_each_entry(qe, queue, entry) {
- if (qe->m->is_response != rx->is_response
- && qe->m->h.sequence_nr == rx->h.sequence_nr)
- return qe;
- }
- return NULL;
-}
-
/* clean up and deallocate the given osmo_pfcp_queue_entry */
static void osmo_pfcp_queue_del(struct osmo_pfcp_queue_entry *qe)
{
@@ -96,6 +86,7 @@
static int osmo_pfcp_queue_destructor(struct osmo_pfcp_queue_entry *qe)
{
osmo_timer_del(&qe->t1);
+ hash_del(&qe->node_by_seq_nr);
llist_del(&qe->entry);
return 0;
}
@@ -144,6 +135,8 @@
INIT_LLIST_HEAD(&ep->sent_requests);
INIT_LLIST_HEAD(&ep->sent_responses);
+ hash_init(ep->sent_requests_by_seq_nr);
+ hash_init(ep->sent_responses_by_seq_nr);
ep->pfcp_fd.fd = -1;
@@ -311,9 +304,11 @@
* Add sent responses to the end of the list: they will rarely be retransmitted at all. */
if (m->is_response) {
llist_add_tail(&qe->entry, &endpoint->sent_responses);
+ hash_add(endpoint->sent_responses_by_seq_nr, &qe->node_by_seq_nr, m->h.sequence_nr);
osmo_timer_setup(&qe->t1, pfcp_queue_sent_resp_timer_cb, qe);
} else {
llist_add(&qe->entry, &endpoint->sent_requests);
+ hash_add(endpoint->sent_requests_by_seq_nr, &qe->node_by_seq_nr, m->h.sequence_nr);
osmo_timer_setup(&qe->t1, pfcp_queue_sent_req_timer_cb, qe);
}
talloc_set_destructor(qe, osmo_pfcp_queue_destructor);
@@ -353,6 +348,30 @@
return 0;
}
+static struct osmo_pfcp_queue_entry *osmo_pfcp_enfpoint_find_sent_request(const struct osmo_pfcp_endpoint *ep, uint32_t seq_nr)
+{
+ struct osmo_pfcp_queue_entry *qe;
+ hash_for_each_possible(ep->sent_requests_by_seq_nr, qe, node_by_seq_nr, seq_nr) {
+ OSMO_ASSERT(qe->m);
+ if (qe->m->h.sequence_nr != seq_nr)
+ continue;
+ return qe;
+ }
+ return NULL;
+}
+
+static struct osmo_pfcp_queue_entry *osmo_pfcp_enfpoint_find_sent_response(const struct osmo_pfcp_endpoint *ep, uint32_t seq_nr)
+{
+ struct osmo_pfcp_queue_entry *qe;
+ hash_for_each_possible(ep->sent_responses_by_seq_nr, qe, node_by_seq_nr, seq_nr) {
+ OSMO_ASSERT(qe->m);
+ if (qe->m->h.sequence_nr != seq_nr)
+ continue;
+ return qe;
+ }
+ return NULL;
+}
+
static void osmo_pfcp_endpoint_handle_rx(struct osmo_pfcp_endpoint *ep, struct osmo_pfcp_msg *m)
{
bool dispatch_rx = true;
@@ -370,7 +389,10 @@
/* If this is receiving a response, search for matching sent request that is now completed.
* If this is receiving a request, search for a matching sent response that can be retransmitted.
* A match is found by sequence_nr. */
- prev_msg = osmo_pfcp_queue_find(m->is_response ? &ep->sent_requests : &ep->sent_responses, m);
+ if (m->is_response)
+ prev_msg = osmo_pfcp_enfpoint_find_sent_request(ep, m->h.sequence_nr);
+ else
+ prev_msg = osmo_pfcp_enfpoint_find_sent_response(ep, m->h.sequence_nr);
if (prev_msg && !m->is_response) {
/* m is a request, and we have already sent a response to this same request earlier. Retransmit the same
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/39456?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I1b7138206ed035bed3d266f713ce1dd62cbe7286
Gerrit-Change-Number: 39456
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39145?usp=email
to look at the new patch set (#4).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: s1gw: add TC_e_rab_modify_ind_cnf[_multi]
......................................................................
s1gw: add TC_e_rab_modify_ind_cnf[_multi]
Test the E-RAB Modify procedure (eNB initiated), which is defined
in 3GPP TS 36.413 section 8.2.4.
Change-Id: Iec95ca0ecf37290bddfbefce1861f8ae66bf4db1
Related: osmo-s1gw.git I750ada0a5a21edc8bc06d567c8000b6304966474
Related: osmo-s1gw.git Icc16a57d40b68bd17c5d207b643927d58176e088
Related: SYS#7308
---
M s1gw/S1GW_ConnHdlr.ttcn
M s1gw/S1GW_Tests.ttcn
M s1gw/expected-results.xml
3 files changed, 258 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/45/39145/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39145?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iec95ca0ecf37290bddfbefce1861f8ae66bf4db1
Gerrit-Change-Number: 39145
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder