Arne, thanks for the review and ACK. I have done quite a bit of stare-at-code on this patch myself, and think I understand what it does - change from "whenever userland updates the counters, check if mgmt needs to be informed" to "inform mgmt via the coarse timers", because there are no more userland packets to trigger this check. But having the review from someone who understands mgmt much better is very welcome :-)
As a side effect, management_bytes_in() and _out() are consolidated into a single function, which (due to being inlined) should do the same thing with the same efficiency, but it's a bit easier to see what happens. I have subjected this to the full server/client tests on Linux and FreeBSD, with/without DCO - and everything works as before. I have also tested this by connecting to the management interface to verify that the counters + event stuff works. No DCO involved, so counters were displayed in the expected intervals and values matched what I expected. Also, "bytecount 0" works to disable it again. On a (FreeBSD) DCO system, the effect was not exactly what I expected - I expected to see >BYTECOUNT: updates "with no interesting content", but actually after setting "bytecount 10", nothing happened for a few minutes - and then it started to work as ordered (without data packets, of course). So it seems as the timer activation got delayed somehow -> this is something we need to come back to, when Linux/FreeBSD DCO stats get implemented. Starting with "management-hold", then "bytecount", then "hold release" gave me counters right away. Mysteries... Your patch has been applied to the master and release/2.6 branch. commit a9991b3eb6644785421398bff8cb3a728d131713 (master) commit 59a96c3ee05cdb842af0956de0a2ba3ffd993980 (release/2.6) Author: Lev Stipakov Date: Thu Dec 15 00:42:20 2022 +0200 management: add timer to output BYTECOUNT Signed-off-by: Lev Stipakov <l...@openvpn.net> Acked-by: Arne Schwabe <a...@rfc2549.org> Message-Id: <20221214224220.307-1-lstipa...@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25707.html Signed-off-by: Gert Doering <g...@greenie.muc.de> -- kind regards, Gert Doering _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel