From: "cron2 (Code Review)" Date: Mon, 15 Dec 2025 15:31:16 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <3b08b24abbc42017fde1000ea4b3e09b090fe56d-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="s7wvJB3jysE="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: schedule: Rework documentation for schedule_add_entry List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --s7wvJB3jysE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#3) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1439?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by cron2 Change subject: schedule: Rework documentation for schedule_add_entry ...................................................................... schedule: Rework documentation for schedule_add_entry The previous documentation was very misleading and made it hard to understand how the sigma parameter is used. Rewrite it so that it better reflects the actual implementation. Change-Id: Idd79f7cbd38e8b0831f15866339c3677a367cd49 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1439 Message-Id: <20251215144656.17299-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35= 070.html Signed-off-by: Gert Doering --- M src/openvpn/schedule.h 1 file changed, 20 insertions(+), 11 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/39/1439/3 diff --git a/src/openvpn/schedule.h b/src/openvpn/schedule.h index 79311c5..3e2a2ad 100644 --- a/src/openvpn/schedule.h +++ b/src/openvpn/schedule.h @@ -81,17 +81,26 @@ /* Public inline functions */ -/* - * Add a struct schedule_entry (whose storage is managed by - * caller) to the btree. tv signifies the wakeup time for - * a future event. sigma is a time interval measured - * in microseconds -- the event window being represented - * starts at (tv - sigma) and ends at (tv + sigma). - * Event signaling can occur anywere within this interval. - * Making the interval larger makes the scheduler more efficient, - * while making it smaller results in more precise scheduling. - * The caller should treat the passed struct schedule_entry as - * an opaque object. +/** + * Add a struct schedule_entry to the scheduler btree or + * update an existing entry with a new wakeup time. + * + * @p sigma is only used when the entry is already present + * in the schedule. If the originally scheduled time and the new + * time are within @p sigma microseconds of each other then the + * entry is not rescheduled and will occur at the original time. + * When adding a new entry @p sigma will be ignored. + * + * @param s scheduler tree + * @param e entry to add to the schedule + * @param tv wakeup time for the entry + * @param sigma window size for the event in microseconds + * + * @note The caller should treat @p e as opaque data. Only + * the scheduler functions should change the object. The + * caller is expected to manage the memory for the object + * and must only free it once it has been removed from the + * schedule. */ static inline void schedule_add_entry(struct schedule *s, struct schedule_entry *e, const str= uct timeval *tv, -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1439?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: Idd79f7cbd38e8b0831f15866339c3677a367cd49 Gerrit-Change-Number: 1439 Gerrit-PatchSet: 3 Gerrit-Owner: flichtenheld Gerrit-Reviewer: cron2 Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel --s7wvJB3jysE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 upl= oaded patch set #3 to the change originally created by flichtenhel= d.

View Change

The following approvals got outdated and were remove= d: Code-Review+2 by cron2

schedule: Rework documentation for =
schedule_add_entry

The previous documentation was very misleading an= d made
it hard to understand how the sigma parameter is used.

Rew= rite it so that it better reflects the actual
implementation.

Cha= nge-Id: Idd79f7cbd38e8b0831f15866339c3677a367cd49
Signed-off-by: Frank L= ichtenheld <frank@...2641...>
Acked-by: Gert Doering <gert@...1386...= 296...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1439
Me= ssage-Id: <20251215144656.17299-1-gert@...1296...>
URL: https://ww= w.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35070.html
Sig= ned-off-by: Gert Doering <gert@...1296...>
---
M src/openvpn/sc= hedule.h
1 file changed, 20 insertions(+), 11 deletions(-)

=
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/=
39/1439/3
diff --git a/src/openvpn/schedule.h b/src/openvpn/schedul=
e.h
index 79311c5..3e2a2ad 100644
--- a/src= /openvpn/schedule.h
+++ b/src/openvpn/schedule.h
= @@ -81,17 +81,26 @@

/* Public inli= ne functions */

-/*
- * Add = a struct schedule_entry (whose storage is managed by
- * caller) to the btree. tv signifies the = wakeup time for
- * a f= uture event. sigma is a time interval measured
- * in microseconds -- the event window being repr= esented
- * starts at (= tv - sigma) and ends at (tv + sigma).
- * Event signaling can occur anywere within this interval.<= /span>
- * Making the interval= larger makes the scheduler more efficient,
- * while making it smaller results in more precise sc= heduling.
- * The calle= r should treat the passed struct schedule_entry as
- * an opaque object.
+/**
+ * Add a struct schedule_entry to the scheduler btree or
+ * update an existing en= try with a new wakeup time.
+ *
+ * @p sig= ma is only used when the entry is already present
+ * in the schedule. If the originally schedul= ed time and the new
+= * time are within @p sigma microseconds of each other then the
<= span style=3D"color: hsl(120, 100%, 40%);">+ * entry is not rescheduled and= will occur at the original time.

+ * When adding a new entry @p sigma will be ignored.+ *
+ * @param s scheduler tree
+ * @param e entry to add to th= e schedule

+ * @param= tv wakeup time for the entry
+ * @param sigma window size for the event in microseconds
+ *
+ * @note The caller should treat @p e as = opaque data. Only
+ *= the scheduler functions should change the object. The
+ * caller is expected to manage the memo= ry for the object
+ *= and must only free it once it has been removed from the
+ * schedule.
*/
static inline void
schedule_add_entry(struct = schedule *s, struct schedule_entry *e, const struct timeval *tv,
=

To view, visit change 1439. To unsubscribe, or for he= lp writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Idd79f7cbd38e8b0831f15866339= c3677a367cd49
Gerrit-Change-Number: 1439
Gerrit-PatchSet: 3
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: cron2 <gert@...1296...>=
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
= --s7wvJB3jysE=--