Attention is currently required from: lynxis lazus, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/39995?usp=email )
Change subject: Improve paging to support Paging Area ID
......................................................................
Patch Set 1:
(3 comments)
File src/osmo-hnbgw/cnlink_paging.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/39995/comment/5bcd51e3_71ebdd73?u… :
PS1, Line 167: const char *cnlink_paging_add_ranap(struct hnbgw_cnlink *cnlink, RANAP_CN_DomainIndicator_t domain, const RANAP_PagingIEs_t *paging_ies)
what is the purpose of passing the `RANAP_CN_DomainIndicator_t domain` parameter given that below it is just set as: `domain = paging_ies->cN_DomainIndicator;`?
File src/osmo-hnbgw/hnbgw_ranap.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/39995/comment/a39af562_4e09b40d?u… :
PS1, Line 328: { RANAP_PagingAreaID_PR_rAI, "RAI" },
why lowercase l and r in lAI and rAI?
https://gerrit.osmocom.org/c/osmo-hnbgw/+/39995/comment/7beaed03_d875abfc?u… :
PS1, Line 409: "Rx Paging from CN: decoding RANAP IE Paging Area ID failed\n");
maybe mention in the error msg that it is broadcasting instead? not sure if that would be obvious from log output otherwise
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/39995?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I915254a39ee04898aa740674b4632a328f281955
Gerrit-Change-Number: 39995
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-CC: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Thu, 10 Apr 2025 06:41:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/39993?usp=email )
Change subject: Log paging response not matching any request by MI
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/39993?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I9c775901b5042b33382e56ac4e2c301524b734a1
Gerrit-Change-Number: 39993
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 10 Apr 2025 06:18:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39991?usp=email )
Change subject: testenv: clone_project: fix getting latest version
......................................................................
testenv: clone_project: fix getting latest version
Extend the logic for getting the last version, so it doesn't only work
with libosmo-sigtran (where the last version happens to be the last one
returned by "git ls-remote --tags") but also for libosmocore where this
isn't the case. Filter the versions by the relevant ones and then sort
them to get the highest one.
Change-Id: Ic15e385b9c8bab5c0dc70276049d6ad5ae927a6a
---
M _testenv/testenv/podman_install.py
1 file changed, 11 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/_testenv/testenv/podman_install.py b/_testenv/testenv/podman_install.py
index 1eaf7e8..27b08b4 100644
--- a/_testenv/testenv/podman_install.py
+++ b/_testenv/testenv/podman_install.py
@@ -3,6 +3,8 @@
import logging
import multiprocessing
import os
+import packaging.version
+import re
import shlex
import string
import subprocess
@@ -103,7 +105,15 @@
url = f"https://gerrit.osmocom.org/{project}"
if testenv.args.binary_repo.endswith(":latest"):
ls_remote = testenv.cmd.run(["git", "ls-remote", "--tags", url], capture_output=True, text=True)
- branch = ls_remote.stdout.split("\n")[-2].split("refs/tags/")[1].split("^")[0]
+ tags = []
+ pattern = re.compile("^\d+\.\d+\.\d+$")
+ for line in ls_remote.stdout.split("\n"):
+ if "refs/tags/" in line:
+ tag = line.split("refs/tags/")[1].split("^")[0]
+ if pattern.match(tag):
+ tags += [tag]
+ tags.sort(key=packaging.version.Version, reverse=True)
+ branch = tags[0]
logging.info(f"{project}: cloning {branch}")
testenv.cmd.run(
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39991?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic15e385b9c8bab5c0dc70276049d6ad5ae927a6a
Gerrit-Change-Number: 39991
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39949?usp=email )
Change subject: client: Process up to 10 recorded pkts per poll iteration
......................................................................
client: Process up to 10 recorded pkts per poll iteration
This should decrease CPU use of lipcap capturing under high capturing
load, which is welcome now that we support osmo_io with io-uring backend
on the Tx side towards osmo-pcap-server.
The processing number is kept low in order to avoid starving the event
loop, as well as avoid filling up the msgb queue of the Tx side towards
osmo-pcap-server.
Related: SYS#7290
Change-Id: I569fc8489bae2b829ef4040d3c5111a61129de68
---
M src/osmo_client_core.c
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/osmo_client_core.c b/src/osmo_client_core.c
index e58439b..daa5fd6 100644
--- a/src/osmo_client_core.c
+++ b/src/osmo_client_core.c
@@ -175,7 +175,9 @@
struct osmo_pcap_handle *ph = fd->data;
int rc;
- rc = pcap_dispatch(ph->handle, 1, pcap_read_one_cb, (u_char *)ph);
+ /* Read up to 10 packets at once, to avoid starving the event loop and
+ * filling up transmit queue towards peer. */
+ rc = pcap_dispatch(ph->handle, 10, pcap_read_one_cb, (u_char *)ph);
if (rc < 0) {
rate_ctr_inc2(ph->ctrg, PH_CTR_PERR);
rate_ctr_inc2(ph->client->ctrg, CLIENT_CTR_PERR);
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39949?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I569fc8489bae2b829ef4040d3c5111a61129de68
Gerrit-Change-Number: 39949
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcap/+/39948?usp=email )
Change subject: client: use pcap_dispatch to avoid extra pkt buffer copy
......................................................................
client: use pcap_dispatch to avoid extra pkt buffer copy
pcap_next() allows use of returned buffer until next time the same API
is called. In order to do so, it internally calls pcap_dispatch() with
an internal handler (in the case of linux pcapint_oneshot_linux()).
That handler basically memcpy()s the pkt buffer obtained in the
pcap_dispatch callback into a temporary static buffer which is then
returned.
We don't need any of that here, and by using pcap_dispatch() directly
(as recommended in pcapint_oneshot_linux() function documentation) we
can skip an extra memcpy() of each packet buffer captured.
Furthermore, it will allow us processing multiple packets from the
captured queue (RA_SOCKET+mmap implementation in linux) in one poll
iteration if several packets have been captured. This will be done in a
follow-up patch.
pcap handle is marked non-blocking to allow polling from it without
ending up blocked. Applying filter is moved beforehand, as seen in
libpcap capturetest example.
Related: SYS#7290
Change-Id: I055efb66fac5e04c541d75ec2c0f654cdfb17838
---
M src/osmo_client_core.c
1 file changed, 28 insertions(+), 14 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/osmo_client_core.c b/src/osmo_client_core.c
index 62b2c3c..e58439b 100644
--- a/src/osmo_client_core.c
+++ b/src/osmo_client_core.c
@@ -152,27 +152,36 @@
return check_gprs(payload_data, payload_len);
}
+static void pcap_read_one_cb(u_char *user, const struct pcap_pkthdr *hdr, const u_char *data)
+{
+ struct osmo_pcap_handle *ph = (struct osmo_pcap_handle *)user;
+ struct osmo_pcap_client *client = ph->client;
+ struct osmo_pcap_client_conn *conn;
+
+ /* NOTE: hdr & data are only available during the call of this callback,
+ * and should be copied somewhere else if need be accessed later.
+ * In here we are fine since we generate a msgb and copy over the
+ * content on each loop iteration below. */
+
+ if (!can_forward_packet(client, ph, hdr, data))
+ return;
+
+ llist_for_each_entry(conn, &client->conns, entry)
+ osmo_client_conn_send_data(conn, ph, hdr, data);
+}
static int pcap_read_cb(struct osmo_fd *fd, unsigned int what)
{
struct osmo_pcap_handle *ph = fd->data;
- struct osmo_pcap_client *client = ph->client;
- struct osmo_pcap_client_conn *conn;
- struct pcap_pkthdr hdr;
- const u_char *data;
+ int rc;
- data = pcap_next(ph->handle, &hdr);
- if (!data) {
+ rc = pcap_dispatch(ph->handle, 1, pcap_read_one_cb, (u_char *)ph);
+ if (rc < 0) {
rate_ctr_inc2(ph->ctrg, PH_CTR_PERR);
- rate_ctr_inc2(client->ctrg, CLIENT_CTR_PERR);
+ rate_ctr_inc2(ph->client->ctrg, CLIENT_CTR_PERR);
return -1;
}
- if (!can_forward_packet(client, ph, &hdr, data))
- return 0;
-
- llist_for_each_entry(conn, &client->conns, entry)
- osmo_client_conn_send_data(conn, ph, &hdr, data);
return 0;
}
@@ -448,6 +457,13 @@
return -2;
}
+ if (client->filter_string)
+ osmo_pcap_handle_install_filter(ph);
+
+ errbuf[0] = '\0';
+ if (pcap_setnonblock(ph->handle, 1, errbuf) != 0)
+ LOGPH(ph, LOGL_ERROR, "Failed pcap_setnonblock(): %s\n", errbuf);
+
fd = pcap_fileno(ph->handle);
if (fd == -1) {
LOGPH(ph, LOGL_ERROR, "No file descriptor provided.\n");
@@ -463,7 +479,5 @@
osmo_timer_setup(&ph->pcap_stat_timer, pcap_check_stats_cb, ph);
pcap_check_stats_cb(ph);
- if (client->filter_string)
- osmo_pcap_handle_install_filter(ph);
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/39948?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I055efb66fac5e04c541d75ec2c0f654cdfb17838
Gerrit-Change-Number: 39948
Gerrit-PatchSet: 6
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>