From: "ralf_lici (Code Review)" Date: Sun, 19 Oct 2025 08:36:58 +0000 In-Reply-To: References: Reply-To: ralf@...2726..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., antonio@...2726..., gert@...1296... Message-ID: <621cc5c4e16fba7674ba0ac7100d4ca125fd3050-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="0qZUHFHyK9c="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: dco-freebsd: store peer stats directly in c2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --0qZUHFHyK9c= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: cron2, flichtenheld, plaisthos, ralf_= lici. Hello cron2, flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1275?usp=3Demail to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review-1 by cron2 Change subject: dco-freebsd: store peer stats directly in c2 ...................................................................... dco-freebsd: store peer stats directly in c2 The dco_context_t structure includes a reference to the general context structure c, which allows us to store dco_read_bytes and dco_write_bytes directly as c2 fields. This aligns the FreeBSD implementation with how we handle DCO peer stats on Linux and Windows. Change-Id: I53dd40fabdeacb9dca843e28fdd3b357711c5a84 Signed-off-by: Ralf Lici --- M src/openvpn/dco_freebsd.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/75/1275/3 diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c index 947a769..056430b 100644 --- a/src/openvpn/dco_freebsd.c +++ b/src/openvpn/dco_freebsd.c @@ -619,10 +619,7 @@ if (nvlist_exists_nvlist(nvl, "bytes")) { - const nvlist_t *bytes =3D nvlist_get_nvlist(nvl, "bytes"); - - dco->dco_read_bytes =3D nvlist_get_number(bytes, "in"); - dco->dco_write_bytes =3D nvlist_get_number(bytes, "out"); + dco_update_peer_stat(dco->c->multi, dco->dco_message_peer_= id, nvlist_get_nvlist(nvl, "bytes")); } dco->dco_message_type =3D OVPN_CMD_DEL_PEER; -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1275?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newpatchset Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I53dd40fabdeacb9dca843e28fdd3b357711c5a84 Gerrit-Change-Number: 1275 Gerrit-PatchSet: 3 Gerrit-Owner: ralf_lici Gerrit-Reviewer: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-CC: ordex Gerrit-Attention: plaisthos Gerrit-Attention: cron2 Gerrit-Attention: flichtenheld Gerrit-Attention: ralf_lici --0qZUHFHyK9c= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: cron2, flichtenheld, plaisthos, ralf_lici.

ralf_lici uploaded patch set #3 to this change.

<= a href=3D"http://gerrit.openvpn.net/c/openvpn/+/1275?usp=3Demail">View Chan= ge

The following approvals got outdated and were removed: Code-Review-1 by cron2

dco-freebsd: store peer stats direc=
tly in c2

The dco_context_t structure includes a reference to the ge= neral context
structure c, which allows us to store dco_read_bytes and d= co_write_bytes
directly as c2 fields. This aligns the FreeBSD implementa= tion with how
we handle DCO peer stats on Linux and Windows.

Chan= ge-Id: I53dd40fabdeacb9dca843e28fdd3b357711c5a84
Signed-off-by: Ralf Lic= i <ralf@...2726...>
---
M src/openvpn/dco_freebsd.c
1 file c= hanged, 1 insertion(+), 4 deletions(-)

git pull =
ssh://gerrit.openvpn.net:29418/openvpn refs/changes/75/1275/3
diff =
--git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c
index 947a769..056430b 100644
--- a/src/openvpn/dco_free= bsd.c
+++ b/src/openvpn/dco_freebsd.c
@@ -6= 19,10 +619,7 @@

if (nvlist_e= xists_nvlist(nvl, "bytes"))
{=
- const nvlist= _t *bytes =3D nvlist_get_nvlist(nvl, "bytes");
-
- dco->dco_read_bytes =3D nvlist_get_number(= bytes, "in");
- dco->dco_write_bytes =3D nvlist_get_number(bytes, &quo= t;out");
+ = dco_update_peer_stat(dco->c->multi, dco->dco_message_pee= r_id, nvlist_get_nvlist(nvl, "bytes"));
= }

dco->dco_message_ty= pe =3D OVPN_CMD_DEL_PEER;

To view, visi= t change= 1275. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I53dd40fabdeacb9dca843e28fdd= 3b357711c5a84
Gerrit-Change-Number: 1275
Gerrit-PatchSet: 3
Gerrit-Owner: ralf_lici <ralf@...2726...>= ;
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-CC: ordex <antonio@...2726...>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: cron2 <gert@...1296...>= ;
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-Attention: ralf_lici <ralf@...2804...= .>
= --0qZUHFHyK9c=--