OpenBSD CVS

CVS log for src/usr.sbin/bgpd/timer.c


[BACK] Up to [local] / src / usr.sbin / bgpd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.19 / (download) - annotate - [select for diffs], Fri Dec 11 12:00:01 2020 UTC (3 years, 5 months ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, HEAD
Changes since 1.18: +51 -50 lines
Diff to previous 1.18 (colored)

Make the timer code independent of struct peer this way it can be used
in other places as well.
ok procter@

Revision 1.18 / (download) - annotate - [select for diffs], Fri May 24 11:37:52 2019 UTC (5 years ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.17: +5 -5 lines
Diff to previous 1.17 (colored)

Change timer_nextisdue() and timer_nextduein() to take the current time
as an argument. This way getmonotime() can be called once at the start
of looping over all peers instead of twice during the loop.
Makes a big difference with many peers.
OK florian@ sthen@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jan 24 04:22:42 2017 UTC (7 years, 4 months ago) by benno
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

sync log.c from relayd et al to bgpd.

there is still a little difference regarding handling of the verbosity
value that will be handled later.

ok claudio@ florian@

Revision 1.16 / (download) - annotate - [select for diffs], Fri Jan 16 06:40:15 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.15 / (download) - annotate - [select for diffs], Thu Apr 12 17:26:09 2012 UTC (12 years, 1 month ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.14: +1 -3 lines
Diff to previous 1.14 (colored)

accept() pacing for bgpd based on similar work done on other daemons.
OK henning@ sthen@

Revision 1.14 / (download) - annotate - [select for diffs], Sun Oct 24 17:20:08 2010 UTC (13 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

spacing and irrelevant glitches which disrupt lint

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Fri Feb 20 07:20:15 2009 UTC (15 years, 3 months ago) by henning
Branch: OPENBSD_4_4
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored) next main 1.13 (colored)

MFC, ok deraadt
revision 1.13
date: 2009/01/21 20:32:53;  author: henning;  state: Exp;  lines: +2 -2
timer_nextduein returned crap. fix it. so obvious... how could that happen.
found out the hard way by Marc Runkel <MRunkel@untangle.com>

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jan 21 20:32:53 2009 UTC (15 years, 4 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

timer_nextduein returned crap. fix it. so obvious... how could that happen.
found out the hard way by Marc Runkel <MRunkel@untangle.com>

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 11 05:30:35 2008 UTC (15 years, 11 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE
Branch point for: OPENBSD_4_4
Changes since 1.11: +18 -5 lines
Diff to previous 1.11 (colored)

use monotime instead of wallclock.
makes us independent from system time changes.
diff from japan,was hiding... ok claudio some time ago

Revision 1.11 / (download) - annotate - [select for diffs], Thu May 8 09:53:12 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.10: +1 -11 lines
Diff to previous 1.10 (colored)

timer_due is not needed any more

Revision 1.10 / (download) - annotate - [select for diffs], Thu May 8 09:51:46 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

KNF

Revision 1.9 / (download) - annotate - [select for diffs], Thu May 8 07:59:56 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.8: +6 -11 lines
Diff to previous 1.8 (colored)

take advanatge of the timewheelin timer_nextduein - we just need to look
at the first one

Revision 1.8 / (download) - annotate - [select for diffs], Thu May 8 07:45:21 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)

we can stopin timer_set if new timeout equals the oldone.
matters for stuff like the HoldTimer that gets reset often

Revision 1.7 / (download) - annotate - [select for diffs], Thu May 8 07:43:03 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.6: +13 -1 lines
Diff to previous 1.6 (colored)

take advantage of the timewheel: instead of checking each an every
timer, just get the first off the queue and check wether it is due

Revision 1.6 / (download) - annotate - [select for diffs], Thu May 8 07:40:03 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

in timer_set, when figuring out the right position for the timer,
wemust stop walking the list once werun into a stopped timer, or
eventually all stopped timers will queue up at the very front (instead of
at the tail)

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 8 06:52:13 2008 UTC (16 years ago) by henning
Branch: MAIN
Changes since 1.4: +60 -29 lines
Diff to previous 1.4 (colored)

change timer internals so that we use a timewheel (tailq, sorted by expiry
so that the timer that will expire first is always the first element,
and so on). will make the checking a bit faster and moreelegant and more
conveniant. ok claudio

Revision 1.4 / (download) - annotate - [select for diffs], Sun Dec 23 18:56:17 2007 UTC (16 years, 5 months ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.3: +15 -1 lines
Diff to previous 1.3 (colored)

provide timer_nextduein, which provides the number of seconds until the
next timer expires.
use that in the session engine's mainloop, which simplifies it and
removes the last bits of timer internals knowledge from anywhere outside
timer.c.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Dec 23 18:26:13 2007 UTC (16 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.2: +3 -1 lines
Diff to previous 1.2 (colored)

send timers for bgpctlshow neighbor foo timer in seperate messages after
the peer data. makes bgpctl display code independent from timer
implementation internals. only running timers are displayed now, stopped
ones are skipped.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Dec 23 16:40:43 2007 UTC (16 years, 5 months ago) by henning
Branch: MAIN
Changes since 1.1: +8 -5 lines
Diff to previous 1.1 (colored)

make all timer_get() callers (except timer_set which will need
special handling) and onein session.c that will go away able to
cope with timer_get() returning NULL (i.e.nosuch timer/not running)

Revision 1.1 / (download) - annotate - [select for diffs], Thu Dec 20 17:08:48 2007 UTC (16 years, 5 months ago) by henning
Branch: MAIN

rework timers.
stop changing tienmr values directly, always use new
timer_(get/set/stop/running) functions. preparation for more to come :)
ok claudio

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.