Hi,

> While this is expedient, adding dco dependence to parts of code which should 
> be independent of such inner details look wrong style to me. Finding a way to 
> keep struct context a const here will lead to a better logic, I think.

We have the same approach in multi_print_status(). Not saying that
"that's why this is right", but we should at least be consistent.

> Can't we have a coarse timer that keeps the stats updated? It doesn't have to 
> be frequent as this is just for information.

I don't think that "purity" would justify the complexity of adding an
additional timer for fetching dco-specific stats.

>> +    status_printf(so, "TCP/UDP read bytes," counter_format, 
>> c->c2.link_read_bytes + c->c2.dco_read_bytes);
>> +    status_printf(so, "TCP/UDP write bytes," counter_format, 
>> c->c2.link_write_bytes + c->c2.dco_write_bytes);
>
> Same here --  have a place to read the total count from independent of dco.

But what is wrong in fetching dco stats when we need them? What is the
advantage of timer?

-Lev


_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to