Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-15 Thread Antonio Quartulli
Hi, On 15/12/2022 13:55, Gert Doering wrote: Hi, On Thu, Dec 15, 2022 at 07:49:53AM -0500, Selva Nair wrote: Possibly we can merge the current patch for openvpn.exe and then improve it later in bug-fix releases of 2.6? This was my thinking as well - so the patch is in, and provides at least

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-15 Thread Gert Doering
Hi, On Thu, Dec 15, 2022 at 07:49:53AM -0500, Selva Nair wrote: > Possibly we can merge the current patch > for openvpn.exe and then improve it later in bug-fix releases of 2.6? This was my thinking as well - so the patch is in, and provides at least some statistics, and room for improvements

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-15 Thread Selva Nair
Hi, On Thu, Dec 15, 2022 at 5:15 AM Antonio Quartulli wrote: > Hi, > > On 15/12/2022 10:31, Lev Stipakov wrote: > > Hi, > > > >> In non-dco use, the stats as persisted by the management interface are > not reset throughout the lifetime of the process. With dco, what the driver > provides is

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-15 Thread Antonio Quartulli
Hi, On 15/12/2022 10:31, Lev Stipakov wrote: Hi, In non-dco use, the stats as persisted by the management interface are not reset throughout the lifetime of the process. With dco, what the driver provides is "Peer Stats" which is reset in OvpnPeerNew() (linux appears to do the same). A

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-15 Thread Lev Stipakov
Hi, > In non-dco use, the stats as persisted by the management interface are not > reset throughout the lifetime of the process. With dco, what the driver > provides is "Peer Stats" which is reset in OvpnPeerNew() (linux appears to > do the same). A quick option > would be to move the

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Selva Nair
More on the data channel traffic stats getting reset on reconnect: >> Here is MSI installer which incorporates required client patches >> >> - management: add timer to output BYTECOUNT >> - Introduce dco_get_peer_stats API and Windows implementation >> >> and a new driver version (0.8.3) with

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Selva Nair
Hi On Wed, Dec 14, 2022 at 6:09 PM Lev Stipakov wrote: > Hi, > > Selva has asked about a build which includes this patch. > > Here is MSI installer which incorporates required client patches > > - management: add timer to output BYTECOUNT > - Introduce dco_get_peer_stats API and Windows

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Selva Nair
Hi, On Wed, Dec 14, 2022 at 1:55 PM Selva Nair wrote: > Hi, > > On Wed, Dec 14, 2022 at 11:49 AM Lev Stipakov wrote: > >> From: Lev Stipakov >> >> dco_get_peer_stats fetches stats for a single peer. This is mostly >> useful in client mode. So far only Windows implements that. >> > > Good to

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Lev Stipakov
Hi, Selva has asked about a build which includes this patch. Here is MSI installer which incorporates required client patches - management: add timer to output BYTECOUNT - Introduce dco_get_peer_stats API and Windows implementation and a new driver version (0.8.3) with stats fixes.

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Gert Doering
Hi, On Wed, Dec 14, 2022 at 10:50:19PM +0200, Lev Stipakov wrote: > On Windows control packets are handled by userspace via link > read/write routines (which use device handle from CreateFile). Both > FreeBSD and Linux implementations use additional, netlink-based (or > FreeBSD analogue) channel

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Lev Stipakov
> This data will also show up as stats on the adapter (device node) and should > include all traffic that passes through it, no? System adapter stats show only tun traffic - the one driver indicates to NetAdapter. For BYTECOUNT we (userspace client) currently show link traffic - encapsulated

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Selva Nair
Hi, On Wed, Dec 14, 2022 at 2:06 PM Lev Stipakov wrote: > > > Right now what the GUI receives as bytecount is not zero, I suppose the > daemon is reporting the control channel traffic. > > Yes. I will fix it in the driver so that it reports only data channel > bytes, since control channel

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Lev Stipakov
Hi, > Good to see this happening.. Turns out there is a bug in the driver at the moment - it doesn't update OUT bytes. This particular API hasn't been used in a while. > Does this data from the driver include both control and data channel bytes? Yes, at the moment those are "link" bytes and

Re: [Openvpn-devel] [PATCH] Introduce dco_get_peer_stats API and Windows implementation

2022-12-14 Thread Selva Nair
Hi, On Wed, Dec 14, 2022 at 11:49 AM Lev Stipakov wrote: > From: Lev Stipakov > > dco_get_peer_stats fetches stats for a single peer. This is mostly > useful in client mode. So far only Windows implements that. > Good to see this happening.. Do you have a link to a build including this patch