Attention is currently required from: neels.
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36540?usp=email )
Change subject: nft_kpi: retrieve counters in a separate thread
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
Blocking of the main thread can happen with this
patch, at the times when the main thread wants to run a quick nft command.
This should NEVER happen. The main loop must not wait/sleep/block waiting for an external
program to run, specially for a network program potentially connected to a hundred other
peers.
This should be done in an async fashion: run the program, get an event loop once it has
finished. Also read its stdout/stderr based on event loops from the pipe fd.
It rings a bells we already have something like that somewhere in libosmocore? See
libosmocore/include/osmocom/core/exec.h
That probably needs to be extended to allow integrating with main loop.
The other solution is ofc having a separate thread and do a blocking fork/exceve/system
call, then use the osmo_itq as mentioned to provide back the counters.
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36540?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I9dc54e6bc94c553f45adfa71ae8ad70be4afbc8f
Gerrit-Change-Number: 36540
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 13 Apr 2024 14:52:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment