Re: have bpf kq events fire when the interface goes away

2021-04-22 Thread Visa Hankala
On Thu, Apr 22, 2021 at 01:13:50PM +1000, David Gwynne wrote: > On Wed, Apr 21, 2021 at 01:15:53PM +, Visa Hankala wrote: > > On Wed, Apr 21, 2021 at 11:04:20AM +1000, David Gwynne wrote: > > > On Wed, Apr 21, 2021 at 10:21:32AM +1000, David Gwynne wrote: > > > > if you have a program that

Re: have bpf kq events fire when the interface goes away

2021-04-21 Thread David Gwynne
On Wed, Apr 21, 2021 at 01:15:53PM +, Visa Hankala wrote: > On Wed, Apr 21, 2021 at 11:04:20AM +1000, David Gwynne wrote: > > On Wed, Apr 21, 2021 at 10:21:32AM +1000, David Gwynne wrote: > > > if you have a program that uses kq (or libevent) to wait for bytes to > > > read off an idle network

Re: have bpf kq events fire when the interface goes away

2021-04-21 Thread Visa Hankala
On Wed, Apr 21, 2021 at 11:04:20AM +1000, David Gwynne wrote: > On Wed, Apr 21, 2021 at 10:21:32AM +1000, David Gwynne wrote: > > if you have a program that uses kq (or libevent) to wait for bytes to > > read off an idle network interface via /dev/bpf and that interface > > goes away, the program

Re: have bpf kq events fire when the interface goes away

2021-04-20 Thread David Gwynne
On Wed, Apr 21, 2021 at 10:21:32AM +1000, David Gwynne wrote: > if you have a program that uses kq (or libevent) to wait for bytes to > read off an idle network interface via /dev/bpf and that interface > goes away, the program doesnt get woken up. this is because the kq > read filter in bpf only

have bpf kq events fire when the interface goes away

2021-04-20 Thread David Gwynne
if you have a program that uses kq (or libevent) to wait for bytes to read off an idle network interface via /dev/bpf and that interface goes away, the program doesnt get woken up. this is because the kq read filter in bpf only checks if there ares bytes available. because a detached interface