Message-ID: <0668f04e-bbcd-e084-c90f-c4cc58992223@...1227...> Date: Mon, 12 Dec 2022 15:14:05 +0100 MIME-Version: 1.0 Content-Language: en-GB References: <20221212095832.2123-1-lstipakov@...277...> From: Arne Schwabe In-Reply-To: <20221212095832.2123-1-lstipakov@...277...> Subject: Re: [Openvpn-devel] [PATCH 1/2] management: refactor bytecount routines 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 10:58 schrieb Lev Stipakov: > From: Lev Stipakov > > In preparation of DCO stats support, simplify > call chains of bytecount routines. No functional changes. It would be nice to be a bit more verbose what you are actually simplyfing in the commit message. E.g. inlining all the various function that are used only once. > + > +void > +management_bytes_client(struct management *man, > + const int size_in, > + const int size_out) > +{ > + if (!(man->persist.callback.flags & MCF_SERVER)) > + { > + man->persist.bytes_in += size_in; > + man->persist.bytes_out += size_out; > + man_bytecount_output_client(man); > + } > } I don't like this part of the change. We are here moving a inline function from the critical path of data channel packets that is called on every single packet into an non-inline function. The old code was taking care that everything that was in that critical path can be inlined. The new code breaks that promise. Arne