diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-01-18 13:20:02 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2023-01-18 13:20:02 +0000 |
commit | fa5ee2c45740d5ec048c59e150e30590a6bca4a5 (patch) | |
tree | 3f1f1dd5fa5ee203a603423e242615adaa5987e8 /usr.sbin/bgpd/rde.c | |
parent | 40416497229bddb66302b7852727e086f5c7e154 (diff) |
Improve pending checks in poll loop by ordering them by trigger frequency
and by making peer_imsg_pending() a true O(1) function.
OK tb@
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r-- | usr.sbin/bgpd/rde.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 2f0fa6c99ed..cc186250d94 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.587 2023/01/17 16:09:01 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.588 2023/01/18 13:20:00 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -249,8 +249,8 @@ rde_main(int debug, int verbose) } } - if (rib_dump_pending() || rde_update_queue_pending() || - nexthop_pending() || peer_imsg_pending()) + if (peer_imsg_pending() || rde_update_queue_pending() || + nexthop_pending() || rib_dump_pending()) timeout = 0; if (poll(pfd, i, timeout) == -1) { |