Attention is currently required from: arehbein, laforge, pespin.
daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34743?usp=email )
Change subject: gsmtap_util: Use Osmo IO instead of Osmo write queues ......................................................................
Patch Set 8:
(1 comment)
File src/core/gsmtap_util.c:
https://gerrit.osmocom.org/c/libosmocore/+/34743/comment/8a07c099_d0014ba2 PS5, Line 478: osmo_iofd_setup(gti, gti->sink_fd, "gsmtap_inst.out", OSMO_IO_FD_MODE_READ_WRITE, &gsmtap_sink_ops, NULL);
In that case I guess we want to limit somehow the read buffer queue in the kernel to the minimum (even 0) to avoid wasting kb/mb of memory for each gsmtap socket sink with filled message that are never read.
Yeah, might be a good idea, but out of scope for this patch.
@arehbein@sysmocom.de gsmtap_source_add_sink is called in logging_gsmtap.c and also in osmo_pcu and osmo_bts.
In libosmocore/src/vty/logging_vty.c cfg_log_gsmtap calls log_target_create_gsmtap with false, true as last parameters. That means ofd_wq_mode false and add_sink true.
We should change the ofd_wq_mode parameter to true here, otherwise it doesn't use osmo_io at all. Not sure if we need a VTY parameter for that.
Since add_sink is true the code will call gsmtap_source_add_sink() which creates the sink only if the gsmtap target is local. So simply enabling gsmtap logging to 127.0.0.1 should call the code in question.