Re: bpf(4) "wait" timeouts

2023-03-07 Thread David Gwynne
On Mon, Feb 13, 2023 at 08:30:03AM +0100, Alexandr Nedvedicky wrote: > Hello, > > This diff looks good to me. Though I still have some > doubts about accuracy of comment here: > > > > return (kn->kn_data > 0); > > @@ -1510,6 +1599,15 @@ bpf_catchpacket(struct bpf_d *d, u_char > >

Re: bpf(4) "wait" timeouts

2023-02-12 Thread Alexandr Nedvedicky
Hello, This diff looks good to me. Though I still have some doubts about accuracy of comment here: > return (kn->kn_data > 0); > @@ -1510,6 +1599,15 @@ bpf_catchpacket(struct bpf_d *d, u_char > ++d->bd_dcount; > return; > } > + > +

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