bpf(4) "wait" timeouts

2023-02-10 Thread David Gwynne
deraadt@ noticed that pflogd wakes up twice a second, event if it has nothing to do or log. the reason for this is how bpf works. when you try and read from a bpf file descriptor, there are three reasons that the read will finish. the first is the obvious one: the bpf packet buffer in the kernel

Re: bgpd refactor common update code

2023-02-10 Thread Theo Buehler
On Fri, Feb 10, 2023 at 01:05:17PM +0100, Claudio Jeker wrote: > There are three functions used to update the Adj-RIB-Out of a peer > depending of the mode of the peer: > up_generate_updates(), up_generate_addpath() and up_generate_addpath_all() > > There is a lot of similar code in there that mak

Re: Make midi(4) event filter MP-safe

2023-02-10 Thread Visa Hankala
On Fri, Feb 10, 2023 at 02:56:21PM +, Visa Hankala wrote: > This makes midi(4) event filter MP-safe. > > The logic is similar to audio(4). As knote(9) is safe to use > at IPL_AUDIO, the deferring through soft interrupts is not needed > any longer. > > In mididetach(), the separate selwakeup()

Make midi(4) event filter MP-safe

2023-02-10 Thread Visa Hankala
This makes midi(4) event filter MP-safe. The logic is similar to audio(4). As knote(9) is safe to use at IPL_AUDIO, the deferring through soft interrupts is not needed any longer. In mididetach(), the separate selwakeup() calls are covered by klist_invalidate(). Could someone with actual midi(4)

Make log event filter MP-safe

2023-02-10 Thread Visa Hankala
This makes log event filter MP-safe. OK? Index: kern/subr_log.c === RCS file: src/sys/kern/subr_log.c,v retrieving revision 1.75 diff -u -p -r1.75 subr_log.c --- kern/subr_log.c 2 Jul 2022 08:50:42 - 1.75 +++ kern/subr_

bgpd refactor common update code

2023-02-10 Thread Claudio Jeker
There are three functions used to update the Adj-RIB-Out of a peer depending of the mode of the peer: up_generate_updates(), up_generate_addpath() and up_generate_addpath_all() There is a lot of similar code in there that makes the code look more complicated then it needs to. I added a helper func