Re: Fix loadavg(3)

2016-11-14 Thread Theo de Raadt
> > Date: Mon, 14 Nov 2016 13:11:58 +0100 > > From: Martin Pieuchot > > > > On 12/11/16(Sat) 15:52, patrick keshishian wrote: > > > Ahh... seems the culprit is softclock_thread added 2016/09/22 > > > (kern/kern_timeout.c mpi@). > > > > I'd suggest we simply skip kernel thread when calculating th

pf af-to route output

2016-11-14 Thread Alexander Bluhm
Hi, The !r->rt case is only used by af-to. pf_route6() calls ip6_output() to do the work while pf_route() has some custom implementation for that. It is simpler to call ip_output() or ip6_output() from pf_test() directly. ok? bluhm Index: net/pf.c =

Re: Fix loadavg(3)

2016-11-14 Thread Mark Kettenis
> Date: Mon, 14 Nov 2016 13:11:58 +0100 > From: Martin Pieuchot > > On 12/11/16(Sat) 15:52, patrick keshishian wrote: > > Ahh... seems the culprit is softclock_thread added 2016/09/22 > > (kern/kern_timeout.c mpi@). > > I'd suggest we simply skip kernel thread when calculating the load. Hmm, I'

Fix loadavg(3)

2016-11-14 Thread Martin Pieuchot
On 12/11/16(Sat) 15:52, patrick keshishian wrote: > Ahh... seems the culprit is softclock_thread added 2016/09/22 > (kern/kern_timeout.c mpi@). I'd suggest we simply skip kernel thread when calculating the load. Since we're slowly moving code executed in software interrupt context to kernel threa

Re: use per cpu counters for udp statistics

2016-11-14 Thread Mike Belopuhov
On 14 November 2016 at 09:38, Martin Pieuchot wrote: > On 14/11/16(Mon) 14:29, David Gwynne wrote: >> its as close to the ipstat change as i can make it. >> >> ok? > > [...] > >> @@ -142,6 +143,7 @@ void udp_notify(struct inpcb *, int); >> void >> udp_init(void) >> { >> + udpcounters =

Re: umb: NCM datagram pointer entries

2016-11-14 Thread Mark Kettenis
> Date: Mon, 14 Nov 2016 10:51:03 +0100 > From: Gerhard Roth > > Hi, > > according to the NCM spec, the list of datagram pointer entries has to > be terminated with an entry where wDatagramIndex and wDatagramLen are > zero. Not all implementations seem to follow that rule: otto@ had one > that o

umb: NCM datagram pointer entries

2016-11-14 Thread Gerhard Roth
Hi, according to the NCM spec, the list of datagram pointer entries has to be terminated with an entry where wDatagramIndex and wDatagramLen are zero. Not all implementations seem to follow that rule: otto@ had one that only sets the index to zero while using an arbitrary length value. The patch

Re: bpf_mtap(9) w/o KERNEL_LOCK

2016-11-14 Thread Martin Pieuchot
On 13/09/16(Tue) 12:23, Martin Pieuchot wrote: > Here's the big scary diff I've been using for some months now to stop > grabbing the KERNEL_LOCK() in bpf_mtap(9). This has been originally > written to prevent lock ordering inside pf_test(). Now that we're > heading toward using a rwlock, we won'

Re: use per cpu counters for udp statistics

2016-11-14 Thread Martin Pieuchot
On 14/11/16(Mon) 14:29, David Gwynne wrote: > its as close to the ipstat change as i can make it. > > ok? [...] > @@ -142,6 +143,7 @@ void udp_notify(struct inpcb *, int); > void > udp_init(void) > { > + udpcounters = counters_alloc(udps_ncounters, M_COUNTERS); No need to pass M_CO