Attention is currently required from: jolly, pespin.
laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40491?usp=email )
Change subject: Add multiple messages buffers to struct iofd_msghdr
......................................................................
Patch Set 3:
(1 comment)
File src/core/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/40491/comment/536cc246_047db4a8?… :
PS3, Line 140: int msg_max;
> this field should probably be in struct osmo_iofd.
I agee. The only reason to have it here was in case the value would change during the lifetime of an io_fd. Like if sometimes we wanted 1, sometimes 5 and sometimes 10 msgb per read/write. As we don't want that, it should indeed go to osmo_iofd, of course with a more descriptive name.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40491?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4fb1067de4615cc22cc6caf99b481491e7f2ef92
Gerrit-Change-Number: 40491
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 04 Jul 2025 14:20:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: jolly, pespin.
laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40490?usp=email )
Change subject: Submit all SQEs to kernel if they don't fit in the io_uring
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
File src/core/osmo_io_uring.c:
https://gerrit.osmocom.org/c/libosmocore/+/40490/comment/5026b1ac_d27929cb?… :
PS3, Line 139: sqe = io_uring_get_sqe(&g_ring.ring);
> I bet this can still probably return NULL since between call to io_uring_submit() and this line the […]
I doubt this patch is useful in general. The *submit* will not release a sqe. It just notifies the kernel that there are new sqe in the shared memory region. The kernel can then start to process them. Let's assume they're all reads, which will only ever complete if some remote node has sent us something. We cannot assume that this will be true between the two lines above. Even if some of our seq are write to a datagram socket, we have no guarantee that the kernel will have completed those between submit and get_sqe.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40490?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I476d9db285a1d257a4a5d43ee45ee0116c7d7009
Gerrit-Change-Number: 40490
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 04 Jul 2025 14:15:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: jolly, pespin.
laforge has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40489?usp=email )
Change subject: Allow io_uring_submit batching just ahead of poll/select
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Several comments: […]
I think for now it's good to have it optional so we can compare, indeed. The delayed submit will likely increase throughput - but at the cost of some added latency. I think it's worth it, but before we've done extensive benchmarks (and asked users to try it in loaded production setups) it might be good to have it disabled by default. As we don't have VTY in all libosmocore applications, and IO_URING is enabled via environment, adding another env variable is fine with me.
But I agree with @pespin regarding the global variable. Note that it will likely have to be __thread / thread-local-storage like all of our I/O. It should be very chaep to set and check compared to unneeded io_uring_submit() all the time without knowig if we actually did submit any new sqe during that given select loop iteration.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40489?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id34fe2ced32c63d15b14810e145744f7509064cc
Gerrit-Change-Number: 40489
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 04 Jul 2025 14:12:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40588?usp=email )
Change subject: Cosmetic: testenv: tweak argparse formatting
......................................................................
Cosmetic: testenv: tweak argparse formatting
Make all "add_argument" calls consistently have one function argument in
one line, instead of only having it in some places, and have all
arguments in one line in others. Having one function arg in one line is
enforced via ruff format when having a comma at the end of the function
call.
Change-Id: Ia1804f0313a27ddf8f7197ce0b2ad3b56421b290
---
M _testenv/testenv/__init__.py
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/88/40588/1
diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index 511ec58..f2f0321 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -73,7 +73,10 @@
sub_run = sub.add_parser("run", help="build components and run a testsuite")
group = sub_run.add_argument_group("testsuite options")
- group.add_argument("testsuite", help="a directory in osmo-ttcn3-hacks.git (msc, bsc, mgw, ...)")
+ group.add_argument(
+ "testsuite",
+ help="a directory in osmo-ttcn3-hacks.git (msc, bsc, mgw, ...)",
+ )
group.add_argument(
"-t",
"--test",
@@ -85,8 +88,17 @@
action="append",
help="which testenv.cfg to use (supports * wildcards via fnmatch)",
)
- group.add_argument("-i", "--io-uring", action="store_true", help="set LIBOSMO_IO_BACKEND=IO_URING")
- group.add_argument("-T", "--titan-version", help="which eclipse-titan version to use")
+ group.add_argument(
+ "-i",
+ "--io-uring",
+ action="store_true",
+ help="set LIBOSMO_IO_BACKEND=IO_URING",
+ )
+ group.add_argument(
+ "-T",
+ "--titan-version",
+ help="which eclipse-titan version to use",
+ )
group = sub_run.add_argument_group("source/binary options", "All components are built from source by default.")
group.add_argument(
@@ -147,10 +159,19 @@
" repository ending in :latest is set"
" or --latest is used.",
)
- group.add_argument("--latest", action="store_true", help="use latest configs")
+ group.add_argument(
+ "--latest",
+ action="store_true",
+ help="use latest configs",
+ )
group = sub_run.add_argument_group("podman options", "All components are run directly on the host by default.")
- group.add_argument("-p", "--podman", action="store_true", help="run all components inside podman")
+ group.add_argument(
+ "-p",
+ "--podman",
+ action="store_true",
+ help="run all components inside podman",
+ )
group.add_argument(
"-d",
"--distro",
@@ -165,7 +186,11 @@
)
group = sub_run.add_argument_group("output options")
- group.add_argument("-l", "--log-dir", help="log here instead of a random dir in /tmp")
+ group.add_argument(
+ "-l",
+ "--log-dir",
+ help="log here instead of a random dir in /tmp",
+ )
group.add_argument(
"-n",
"--no-tee",
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40588?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ia1804f0313a27ddf8f7197ce0b2ad3b56421b290
Gerrit-Change-Number: 40588
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40589?usp=email )
Change subject: testenv: add run --asan
......................................................................
testenv: add run --asan
Add a new --asan option for building Osmocom libraries and programs from
source with address sanitizer enabled. This works by adding
sanitize.opts to osmo-dev's gen_makefile.py, which in turn adds
--enable-sanitize to most Osmocom projects.
The --autoreconf-in-src-copy argument for gen_makefile.py must be moved
up, so the list of *.opts files is not interrupted by another type of
argument that causes argument parsing to fail.
Suggested-by: Pau Espin Pedrol <pespin(a)sysmocom.de>
Related: https://gitea.osmocom.org/osmocom/osmo-dev/src/branch/master/sanitize.opts
Change-Id: I1947dd3a7d9ce51dcbef9cffd5d7b402f236b9e2
---
M _testenv/testenv/__init__.py
M _testenv/testenv/cmd.py
M _testenv/testenv/osmo_dev.py
3 files changed, 16 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/40589/1
diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index f2f0321..3de7f0c 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -113,6 +113,12 @@
help="number of jobs to run simultaneously (default: nproc)",
type=int,
)
+ group.add_argument(
+ "-a",
+ "--asan",
+ action="store_true",
+ help="pass --enable-sanitize to Osmocom configure scripts",
+ )
group = sub_run.add_argument_group("exit options", "When and how testenv should exit when done.")
group = group.add_mutually_exclusive_group()
@@ -229,6 +235,11 @@
if args.action != "run":
return
+ if args.binary_repo and args.asan:
+ raise NoTraceException(
+ "--binary-repo cannot be used with --asan, consider using '--binary-repo osmocom:nightly:asan' instead"
+ )
+
if args.binary_repo and not args.podman:
raise NoTraceException("--binary-repo requires --podman")
diff --git a/_testenv/testenv/cmd.py b/_testenv/testenv/cmd.py
index d4a1e9a..e8598f0 100644
--- a/_testenv/testenv/cmd.py
+++ b/_testenv/testenv/cmd.py
@@ -56,6 +56,8 @@
else:
make_dir = os.path.join(testenv.args.cache, "host", "make")
make_dir += str(make_dir_version)
+ if testenv.args.asan:
+ make_dir += "-asan"
env_extra["OSMO_DEV_MAKE_DIR"] = make_dir
if testenv.args.kernel == "debian":
diff --git a/_testenv/testenv/osmo_dev.py b/_testenv/testenv/osmo_dev.py
index 45912ae..5852063 100644
--- a/_testenv/testenv/osmo_dev.py
+++ b/_testenv/testenv/osmo_dev.py
@@ -58,6 +58,8 @@
return
extra_opts = []
+ if testenv.args.asan:
+ extra_opts += ["sanitize.opts"]
if testenv.args.jobs:
extra_opts += [f"-j{testenv.args.jobs}"]
@@ -73,6 +75,7 @@
"--no-ldconfig",
"--src-dir",
testenv.src_dir,
+ "--autoreconf-in-src-copy",
"default.opts",
"ccache.opts",
"gtp_linux.opts",
@@ -85,7 +88,6 @@
"no_systemd.opts",
"werror.opts",
os.path.join(testenv.data_dir, "osmo-dev/testenv.opts"),
- "--autoreconf-in-src-copy",
] + extra_opts
cwd = get_osmo_dev_dir()
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40589?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1947dd3a7d9ce51dcbef9cffd5d7b402f236b9e2
Gerrit-Change-Number: 40589
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/40491?usp=email )
Change subject: Add multiple messages buffers to struct iofd_msghdr
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
Maybe if this are partial steps, please ad something like [1/N], [2/N] at the end of each commit, to denote they should be merged/reverted together.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/40491?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4fb1067de4615cc22cc6caf99b481491e7f2ef92
Gerrit-Change-Number: 40491
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Fri, 04 Jul 2025 13:54:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No