use per cpu counters for ipstat

2016-11-08 Thread David Gwynne
since counters are an array of uint64_t values, this uses an enum to list the indexes into such an array. we still export an ipstat struct to userland (which you can see with netstat -sp ip). the export cheats a bit because we know that the struct is a collection of u_longs, so we just iterate ove

Re: let pool allocators advertise multiple page sizes

2016-11-08 Thread David Gwynne
On Tue, Nov 08, 2016 at 10:57:41AM +1000, David Gwynne wrote: > this turns the pa_pagesz member of a pool allocator into a bitfield. > > pool pages can be many different sizes, they arent restricted to > just the size provided by the hardware. to support this without > introducing a page allocator

Re: Recursive splsoftnet() in PMTU

2016-11-08 Thread Alexander Bluhm
On Mon, Nov 07, 2016 at 10:36:26AM +0100, Martin Pieuchot wrote: > Timers configured with rt_timer_add(9) are always run under splsoftnet() > so no need to take it recursively. > > ok? OK bluhm@ > > Index: netinet/ip_icmp.c > === >

Re: [PATCH] fix typo in vmt.c

2016-11-08 Thread Bryan Vyhmeister
On Wed, Nov 09, 2016 at 12:10:53PM +1100, Jonathan Gray wrote: > On Tue, Nov 08, 2016 at 05:03:32PM -0800, Bryan Vyhmeister wrote: > > I noticed a typo in sys/dev/pv/vmt.c. > > > > Bryan > > There is a typo in your patch. I suppose if you want to go with British English recognise is acceptable.

Re: [PATCH] fix typo in vmt.c

2016-11-08 Thread Jonathan Gray
On Tue, Nov 08, 2016 at 05:03:32PM -0800, Bryan Vyhmeister wrote: > I noticed a typo in sys/dev/pv/vmt.c. > > Bryan There is a typo in your patch. > > > Index: sys/dev/pv/vmt.c > === > RCS file: /cvs/src/sys/dev/pv/vmt.c,v > retri

Re: Avoid spl recursion in doaccept()

2016-11-08 Thread Alexander Bluhm
On Mon, Nov 07, 2016 at 10:16:14AM +0100, Martin Pieuchot wrote: > @@ -366,18 +362,23 @@ redo: > > if (error) { > /* if an error occurred, free the file descriptor */ > + splx(s); > + m_freem(nam); > fdplock(fdp); > fdremove(

[PATCH] fix typo in vmt.c

2016-11-08 Thread Bryan Vyhmeister
I noticed a typo in sys/dev/pv/vmt.c. Bryan Index: sys/dev/pv/vmt.c === RCS file: /cvs/src/sys/dev/pv/vmt.c,v retrieving revision 1.10 diff -u -p -r1.10 vmt.c --- sys/dev/pv/vmt.c4 Oct 2016 09:59:44 - 1.10 +++ sys/dev/

Re: Avoid spl recursion in doaccept()

2016-11-08 Thread Mike Belopuhov
On Mon, Nov 07, 2016 at 10:16 +0100, Martin Pieuchot wrote: > We're aiming to replace critical sections protected by splsoftnet() by > a non recursive rwlock. So we'll have to care about recursivity. > > Diff below prevents a recursion in the error path. Currently closef() > will call soclose()

Re: set explicit permissions for various symlinks

2016-11-08 Thread Theo Buehler
On Tue, Nov 08, 2016 at 11:58:12AM -0800, Philip Guenther wrote: > On Tue, Nov 8, 2016 at 11:49 AM, Theo Buehler wrote: > > One more: all these symlinks get permissions dependent on the umask > > during make build, so set them explicitly to 755. I don't think there's > > enough of them to warrant

Re: splnet() in socket layer

2016-11-08 Thread Mike Belopuhov
On Mon, Nov 07, 2016 at 09:59 +0100, Martin Pieuchot wrote: > splnet() was necessary when link state changes were executed from > hardware interrupt handlers. In 2013 they got deferred to their own > task, so KERNEL_LOCK() is what really protect these data structures. > > This is part of my bigge

Re: set explicit permissions for various symlinks

2016-11-08 Thread Philip Guenther
On Tue, Nov 8, 2016 at 11:49 AM, Theo Buehler wrote: > One more: all these symlinks get permissions dependent on the umask > during make build, so set them explicitly to 755. I don't think there's > enough of them to warrant creating a SYMLINKMODE in bsd.own.mk. Meh. symlink mode has *no* effec

set explicit permissions for various symlinks

2016-11-08 Thread Theo Buehler
One more: all these symlinks get permissions dependent on the umask during make build, so set them explicitly to 755. I don't think there's enough of them to warrant creating a SYMLINKMODE in bsd.own.mk. Index: ./bin/chmod/Makefile =

Re: chown and chmod in includes/Makefile

2016-11-08 Thread Todd C. Miller
On Tue, 08 Nov 2016 16:29:26 +0100, Theo Buehler wrote: > Let's move the chown and chmod to later. I changed chmod -R to chmod -RP > to set the owner and group of symlinks explicitly (the symlinks point to > files under /usr/include, so these files got chowned twice). Set the > permissions of the

set permissions for src.db and mandoc.db

2016-11-08 Thread Theo Buehler
Set explicit permissions for src.db and mandoc.db so they don't depend on the umask. Index: ./distrib/sets/Makefile === RCS file: /var/cvs/src/distrib/sets/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- ./distrib/set

Re: Problems with rdomain and net/if.c v1.455

2016-11-08 Thread Claudio Jeker
On Tue, Nov 08, 2016 at 03:36:22PM +0100, Martin Pieuchot wrote: > On 04/11/16(Fri) 10:45, Claudio Jeker wrote: > > On Wed, Nov 02, 2016 at 05:44:14PM +0100, Martin Pieuchot wrote: > > > [..] > > > Diff below should fix that by automagically creating a loopback > > > interface when a new routing d

chown and chmod in includes/Makefile

2016-11-08 Thread Theo Buehler
This is related to my previous mail on groups and permissions of gnu/usr.bin/cc. include/Makefile does a recursive chown and sets permissions of the headers and directories explicitly, but installs some more headers afterward. Let's move the chown and chmod to later. I changed chmod -R to chmod -

groups and permissions of files from gnu/usr.bin/cc

2016-11-08 Thread Theo Buehler
The permisisons of the specs file in gcc-lib/amd64-unknown-openbsd6.0/4.2.1/ depend on the umask, thus set it explicitly to 444. Moreover, headers and info files are installed with group wheel, which is different from all other headers and info files, so change that accordingly. Index: gnu/usr.bi

[PATCH] iked: Preserve address information during rekeying

2016-11-08 Thread Thomas Klute
Hi tech@, a week ago I reported to bugs@ that iked "forgets" the local and peer addresses associated with an IKE SA while rekeying it if iked has initiated the rekeying, breaking any IKE requests iked tries to send after rekeying [1]. The patch below fixes the bug by copying the addresses from

Re: Problems with rdomain and net/if.c v1.455

2016-11-08 Thread Martin Pieuchot
On 04/11/16(Fri) 10:45, Claudio Jeker wrote: > On Wed, Nov 02, 2016 at 05:44:14PM +0100, Martin Pieuchot wrote: > > [..] > > Diff below should fix that by automagically creating a loopback > > interface when a new routing domain is created. That mean loX will > > now correspond to routing domain

Re: Remove vgrind in ctags

2016-11-08 Thread Moritz Buhl
Sorry, I noticed that vgrind still is in the ports after writing the mail. I will do more research before writing a patch next time. On 11/08/16 11:49, Theo Buehler wrote: On Tue, Nov 08, 2016 at 11:42:17AM +0100, Theo Buehler wrote: On Tue, Nov 08, 2016 at 10:53:37AM +0100, Moritz Buhl wrote:

Re: .depend permissions for libraries

2016-11-08 Thread Theo Buehler
On Tue, Nov 08, 2016 at 11:24:12AM +0100, Theo Buehler wrote: > On Tue, Nov 08, 2016 at 10:26:43AM +0100, Martin Natano wrote: > > This code comes from a time before sed -i existed. In this time and age > > we can just use inline sed. > > > > sed -i 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o r\1.o:/' .d

Re: Remove vgrind in ctags

2016-11-08 Thread Theo Buehler
On Tue, Nov 08, 2016 at 11:42:17AM +0100, Theo Buehler wrote: > On Tue, Nov 08, 2016 at 10:53:37AM +0100, Moritz Buhl wrote: > > Hi, since vgrind was removed in 4.9 I removed the -v option in ctags. > > At least the example in ctags(1) could be modified. > > > > Greetings Moritz Buhl > > The diff

Re: Remove vgrind in ctags

2016-11-08 Thread Theo Buehler
On Tue, Nov 08, 2016 at 10:53:37AM +0100, Moritz Buhl wrote: > Hi, since vgrind was removed in 4.9 I removed the -v option in ctags. > At least the example in ctags(1) could be modified. > > Greetings Moritz Buhl The diff got mangled by your mail program, please resend it. The synopsis in ctags.

Re: .depend permissions for libraries

2016-11-08 Thread Theo Buehler
On Tue, Nov 08, 2016 at 10:26:43AM +0100, Martin Natano wrote: > This code comes from a time before sed -i existed. In this time and age > we can just use inline sed. > > sed -i 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o r\1.o:/' .depend > > With this we avoid /tmp and the related permission issues a

Remove vgrind in ctags

2016-11-08 Thread Moritz Buhl
Hi, since vgrind was removed in 4.9 I removed the -v option in ctags. At least the example in ctags(1) could be modified. Greetings Moritz Buhl ? ctags-vgrind.diff Index: ctags.1 === RCS file: /cvs/src/usr.bin/ctags/ctags.1,v re

Re: .depend permissions for libraries

2016-11-08 Thread Martin Natano
On Sun, Nov 06, 2016 at 12:56:31PM +0100, Theo Buehler wrote: > The lib/*/obj/.depend files end up having permissions 600 since they are > created as tempfiles and then moved to the obj directory. I think that > there is no deeper reason for such restrictive permissions and it gets > in the way of