Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/28708 )
Change subject: constify local var in upf_gtp.c
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28708
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I08085a6e777175b97b9c32d4c302c9863c6f6f59
Gerrit-Change-Number: 28708
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 21 Jul 2022 09:27:15 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28669 )
Change subject: trxcon: rework L1CTL socket API to support multiple clients
......................................................................
Patch Set 5:
(1 comment)
File src/host/trxcon/src/l1ctl_link.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/28669/comment/8d8b632d_a39fd0ff
PS5, Line 223: osmo_fd_setup(&server->ofd, -1, OSMO_FD_READ, &l1ctl_server_conn_cb, server, 0);
> I am not getting the question. […]
passing "func" vs "&func". I see all code in osmocom passing "func".
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28669
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I1cfc49f36ead6e2ba0a6110b0fb65c55412ef5e3
Gerrit-Change-Number: 28669
Gerrit-PatchSet: 5
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 21 Jul 2022 09:24:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28704 )
Change subject: Use cbc_{cbsp,sbcap}_link_close when possible
......................................................................
Patch Set 1:
(1 comment)
File src/cbsp_link.c:
https://gerrit.osmocom.org/c/osmo-cbc/+/28704/comment/feb551a9_174aa4bf
PS1, Line 155: cbc_cbsp_link_close(link);
> Unrelated: looks like we leak memory here. I think we need to: […]
No we don't. this function calls osmo_stream_srv_close(), which calls the close_cb (cbsp_cbc_closed_cb) which sends CBSP_LINK_E_CMD_CLOSE to the FSM which terminates it, and the cleanup_cb of the fsm frees everything.
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28704
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ie020b9b5ee93ae8d0c9e7266177728185e8635f2
Gerrit-Change-Number: 28704
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 21 Jul 2022 09:23:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
neels has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/28239 )
Change subject: implement OSMO_LOG_PFCP_MSG_SRC as va function
......................................................................
Abandoned
patch moved to libosmo-pfcp.git
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28239
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I1713868ebb9583c67f0a4ecc9558263f6888a24d
Gerrit-Change-Number: 28239
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
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-MessageType: abandon
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/28707 )
Change subject: add some comments in upf_gtp.c
......................................................................
add some comments in upf_gtp.c
Related: SYS#5599
Change-Id: I58f86cd84207a74e078ae4758bbed76bb1595d95
---
M src/osmo-upf/upf_gtp.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/07/28707/1
diff --git a/src/osmo-upf/upf_gtp.c b/src/osmo-upf/upf_gtp.c
index 8eef49f..2c8f89f 100644
--- a/src/osmo-upf/upf_gtp.c
+++ b/src/osmo-upf/upf_gtp.c
@@ -96,6 +96,8 @@
static int upf_gtp_dev_destruct(struct upf_gtp_dev *dev);
+/* Allocate state for one GTP device, add to g_upf->gtp.devs and return the created device. If state for the device of
+ * that name already exists, do nothing and return NULL. */
static struct upf_gtp_dev *upf_gtp_dev_alloc(const char *name, const char *local_addr)
{
struct upf_gtp_dev *dev = upf_gtp_dev_find_by_name(name);
@@ -260,9 +262,11 @@
return 0;
}
+ /* Already open? */
if (g_upf->gtp.nl && g_upf->gtp.genl_id >= 0)
return 0;
+ /* sanity / paranoia: if re-opening, make sure the previous socket is closed */
if (g_upf->gtp.nl)
upf_gtp_genl_close();
--
To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/28707
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-upf
Gerrit-Branch: master
Gerrit-Change-Id: I58f86cd84207a74e078ae4758bbed76bb1595d95
Gerrit-Change-Number: 28707
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has submitted this change. ( 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(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/src/libosmo-pfcp/pfcp_endpoint.c b/src/libosmo-pfcp/pfcp_endpoint.c
index e044e75..32bcd0e 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) * 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: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged