Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1952?usp=email
to review the following change.
Change subject: dco: stop fetching peer stats during client disconnect
......................................................................
dco: stop fetching peer stats during client disconnect
The disconnect path asks DCO for a fresh peer dump after the multi
instance has already been removed from the peer-id lookup table. For
kernel-initiated disconnects, the peer has also already been deleted by
the time its notification is processed. The reply therefore cannot
update the disconnecting instance.
Moreover, each disconnect dumps all surviving peers, causing avoidable
netlink traffic and repeated work when many clients disconnect at once.
Use the cached counters directly. Kernels that provide a final
statistics snapshot in the deletion notification can update them before
the disconnect environment is prepared.
Change-Id: Ic535bb1f0da1739f87e9d6bef6fd1061247b05de
Signed-off-by: Ralf Lici <[email protected]>
---
M src/openvpn/multi.c
1 file changed, 2 insertions(+), 10 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/52/1952/1
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 3e72b92..f303826 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -496,16 +496,8 @@
}
static void
-setenv_stats(struct multi_context *m, struct context *c)
+setenv_stats(struct context *c)
{
- if (dco_enabled(&m->top.options))
- {
- if (dco_get_peer_stats_multi(&m->top.c1.tuntap->dco, false) < 0)
- {
- return;
- }
- }
-
setenv_counter(c->c2.es, "bytes_received", c->c2.link_read_bytes +
c->c2.dco_read_bytes);
setenv_counter(c->c2.es, "bytes_sent", c->c2.link_write_bytes +
c->c2.dco_write_bytes);
}
@@ -517,7 +509,7 @@
setenv_trusted(mi->context.c2.es, get_link_socket_info(&mi->context));
/* setenv stats */
- setenv_stats(m, &mi->context);
+ setenv_stats(&mi->context);
/* setenv connection duration */
setenv_long_long(mi->context.c2.es, "time_duration", now - mi->created);
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1952?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic535bb1f0da1739f87e9d6bef6fd1061247b05de
Gerrit-Change-Number: 1952
Gerrit-PatchSet: 1
Gerrit-Owner: ralf_lici <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel