Attention is currently required from: laforge, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/28244 )
Change subject: add pfcp_endpoint
......................................................................
Patch Set 4:
(1 comment)
File src/libosmo-pfcp/pfcp_endpoint.c:
https://gerrit.osmocom.org/c/osmo-upf/+/28244/comment/f38ce1a3_ac80ec72
PS4, Line 268: /* Slight optimization: Add sent requests to the start of the list: we will usually receive a response shortly
> I haven't done a deep review, but if there is no reason to have a shared path/queue for requests and […]
indeed. i have applied this in https://gerrit.osmocom.org/c/libosmo-pfcp/+/28337
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28244
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: Ic8d42e201b63064a71b40ca45a5a40e29941e8ac
Gerrit-Change-Number: 28244
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 17 Jun 2022 21:57:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/28337 )
Change subject: separate pfcp_queue_timer_cb() in req and resp
......................................................................
separate pfcp_queue_timer_cb() in req and resp
Having separate callbacks for request and response messages makes for
an easier read. No functional change.
This applies code review from
https://gerrit.osmocom.org/c/osmo-upf/+/28244
Ic8d42e201b63064a71b40ca45a5a40e29941e8ac (osmo-upf.git)
Related: SYS#5599
Change-Id: Ic8ab71f5efd4cf669689a0b075f9a52ce66bdd5d
---
M src/libosmo-pfcp/pfcp_endpoint.c
1 file changed, 30 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/37/28337/1
diff --git a/src/libosmo-pfcp/pfcp_endpoint.c b/src/libosmo-pfcp/pfcp_endpoint.c
index 83b7c1a..e58cc1d 100644
--- a/src/libosmo-pfcp/pfcp_endpoint.c
+++ b/src/libosmo-pfcp/pfcp_endpoint.c
@@ -171,27 +171,38 @@
return true;
}
-/* T1 for a given queue entry has expired */
-static void pfcp_queue_timer_cb(void *data)
+/* T1 for a given sent_requests queue entry has expired */
+static void pfcp_queue_sent_req_timer_cb(void *data)
{
struct osmo_pfcp_queue_entry *qe = data;
bool keep;
- if (qe->m->is_response) {
- /* The response has waited in the queue for any retransmissions of its initiating request. Now that time
- * has passed and the response can be dropped from the queue. */
- keep = false;
- } else {
- /* The request is still here, which means it has not received a response from the remote side.
- * Retransmit the request. */
- keep = pfcp_queue_retrans(qe);
- }
+ /* qe->m is a request sent earlier */
+ OSMO_ASSERT(!qe->m->is_response);
+ /* The request is still here, which means it has not received a response from the remote side.
+ * Retransmit the request. */
+ keep = pfcp_queue_retrans(qe);
if (keep)
return;
+
+ /* Retransmission has elapsed. Notify resp_cb that receiving a response has failed. */
+ if (qe->m->ctx.resp_cb)
+ qe->m->ctx.resp_cb(qe->m, NULL, "PFCP request retransmissions elapsed, no response received");
/* Drop the queue entry. No more retransmissions. */
- if (!qe->m->is_response && qe->m->ctx.resp_cb)
- qe->m->ctx.resp_cb(qe->m, NULL, "PFCP retransmissions elapsed, no response received");
+ osmo_pfcp_queue_del(qe);
+}
+
+/* T1 for a given sent_responses queue entry has expired */
+static void pfcp_queue_sent_resp_timer_cb(void *data)
+{
+ struct osmo_pfcp_queue_entry *qe = data;
+
+ /* qe->m is a response sent earlier */
+ OSMO_ASSERT(qe->m->is_response);
+
+ /* The response has waited in the queue for any retransmissions of its initiating request. Now that time
+ * has passed and the response can be dropped from the queue. */
osmo_pfcp_queue_del(qe);
}
@@ -268,13 +279,15 @@
/* Slight optimization: Add sent requests to the start of the list: we will usually receive a response shortly
* after sending a request, removing that entry from the queue quickly.
* Add sent responses to the end of the list: they will rarely be retransmitted at all. */
- if (m->is_response)
+ if (m->is_response) {
llist_add_tail(&qe->entry, &endpoint->sent_responses);
- else
- llist_add_tail(&qe->entry, &endpoint->sent_requests);
+ osmo_timer_setup(&qe->t1, pfcp_queue_sent_resp_timer_cb, qe);
+ } else {
+ llist_add(&qe->entry, &endpoint->sent_requests);
+ osmo_timer_setup(&qe->t1, pfcp_queue_sent_req_timer_cb, qe);
+ }
talloc_set_destructor(qe, osmo_pfcp_queue_destructor);
- osmo_timer_setup(&qe->t1, pfcp_queue_timer_cb, qe);
osmo_timer_schedule(&qe->t1, timeout/1000, timeout%1000);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/28337
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: Ic8ab71f5efd4cf669689a0b075f9a52ce66bdd5d
Gerrit-Change-Number: 28337
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/28335 )
Change subject: update git URLs (git -> https; gitea)
......................................................................
update git URLs (git -> https; gitea)
Change-Id: Idac4924a077b5389e85efaf62081589fc3de06ad
---
M README.md
M configure.ac
M contrib/test/test-m3ua.sh
M contrib/test/test-sua.sh
M debian/control
5 files changed, 7 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/35/28335/1
diff --git a/README.md b/README.md
index 98b3591..2ec30c8 100644
--- a/README.md
+++ b/README.md
@@ -20,10 +20,9 @@
You can clone from the official git repository using
- git clone git://git.osmocom.org/libosmo-sccp.git
- git clone https://git.osmocom.org/libosmo-sccp.git
+ git clone https://gitea.osmocom.org/osmocom/libosmo-sccp
-There is a cgit interface at https://git.osmocom.org/libosmo-sccp/
+There is a web interface at <https://gitea.osmocom.org/osmocom/libosmo-sccp>
Documentation
-------------
diff --git a/configure.ac b/configure.ac
index 4367b8a..92325d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,7 +170,7 @@
AM_PATH_PYTHON
AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmo_verify_transcript_vty.py,yes)
if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
- AC_MSG_ERROR([Please install git://osmocom.org/python/osmo-python-tests to run the VTY/CTRL tests.])
+ AC_MSG_ERROR([Please install https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests to run the VTY/CTRL tests.])
fi
fi
AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
diff --git a/contrib/test/test-m3ua.sh b/contrib/test/test-m3ua.sh
index 0f81fe8..927f514 100755
--- a/contrib/test/test-m3ua.sh
+++ b/contrib/test/test-m3ua.sh
@@ -3,7 +3,7 @@
# this script executes m3ua-testtool against osmo-stp. It assumes that
# it is called from within libosmo-sccp/contrib/test and also assumes
# that adjacent to the libosmo-sccp, there's a check-out of
-# git://git.osmocom.org/nplab/m3ua-testtool
+# https://gitea.osmocom.org/nplab/m3ua-testtool
# the top of the libosmo-sccp git repository
TOPDIR=../../
diff --git a/contrib/test/test-sua.sh b/contrib/test/test-sua.sh
index 0cb4e35..9f97f43 100755
--- a/contrib/test/test-sua.sh
+++ b/contrib/test/test-sua.sh
@@ -3,7 +3,7 @@
# this script executes m3ua-testtool against osmo-stp. It assumes that
# it is called from within libosmo-sccp/contrib/test and also assumes
# that adjacent to the libosmo-sccp, there's a check-out of
-# git://git.osmocom.org/nplab/m3ua-testtool
+# https://gitea.osmocom.org/nplab/sua-testtool
# the top of the libosmo-sccp git repository
TOPDIR=../../
diff --git a/debian/control b/debian/control
index 7955055..5885de9 100644
--- a/debian/control
+++ b/debian/control
@@ -17,8 +17,8 @@
libsctp-dev,
osmo-gsm-manuals-dev (>= 1.1.0)
Standards-Version: 3.9.7
-Vcs-Git: git://git.osmocom.org/libosmo-sccp.git
-Vcs-Browser: http://git.osmocom.org/libosmo-sccp/
+Vcs-Git: https://gitea.osmocom.org/osmocom/libosmo-sccp
+Vcs-Browser: https://gitea.osmocom.org/osmocom/libosmo-sccp
Homepage: https://projects.osmocom.org/projects/libosmo-sccp
Package: libosmo-sccp-dev
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/28335
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Idac4924a077b5389e85efaf62081589fc3de06ad
Gerrit-Change-Number: 28335
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange