Message-ID: <2680b52b-e2d8-9a44-e2ee-b227ac374313@...1227...> Date: Mon, 12 Dec 2022 15:25:54 +0100 MIME-Version: 1.0 Content-Language: en-GB References: <20221212115642.2139-1-lstipakov@...277...> From: Arne Schwabe In-Reply-To: <20221212115642.2139-1-lstipakov@...277...> Subject: Re: [Openvpn-devel] [PATCH 2/2] management: add timer to push BYTECOUNT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit To: Lev Stipakov , openvpn-devel@lists.sourceforge.net Cc: Lev Stipakov Am 12.12.22 um 12:56 schrieb Lev Stipakov: > From: Lev Stipakov > > At the moment BYTECOUNT in,out is pushed if there is traffic. > With DCO, userspace process doesn't see the traffic, so we need > to add a timer which periodically fetches stats from DCO and > pushes to management client. The timer interval is set by existing > "bytecount n" management command. > > This commit only adds a timer, stats fetching from DCO will be added > later. If you do the timers anyway why keep the other logic that triggers on updating the byte count? That feels duplicating and unnecessary complexity. So if we switch to a timer, I would strongly advocate to remove the other code path to avoid having two code paths that only add complexity but do not offer any significant (none?) benefit vs only keeping the timer. Arne