Re: Nuke db_is_active in favor of db_active

2019-07-16 Thread Martin Pieuchot
On 08/07/19(Mon) 15:00, Martin Pieuchot wrote: > On 26/06/19(Wed) 19:13, Christian Ludwig wrote: > > We have two variables with the same meaning. db_active is used in way > > more places, so let's nuke db_is_active. > > Thanks for the cleanup! > > > Now that db_active is in for a while already a

Re: ETHER_IS_BCASTADDR() / ETHER_IS_ANYADDR()

2019-07-16 Thread David Gwynne
> On 17 Jul 2019, at 09:44, Martin Pieuchot wrote: > > On 15/07/19(Mon) 15:29, Todd C. Miller wrote: >> On Mon, 15 Jul 2019 18:21:28 -0300, Martin Pieuchot wrote: >> >>> We have many home brewed ways to check Ethernet addresses. This diff >>> introduces two macros similar to ETHER_IS_MULTICA

Re: pool for pfkey pcb

2019-07-16 Thread Martin Pieuchot
On 16/07/19(Tue) 22:45, Alexander Bluhm wrote: > Hi, > > Convert struct pkpcb malloc(9) to pool_get(9). PCB for pfkey is > only used in process context, so pass PR_WAITOK to pool_init(9). > The possible sleep in pool_put(9) should not hurt, as pfkeyv2_detach() > is only called by soclose(9). In

Re: mbuf cluster limit pool wakeup

2019-07-16 Thread Martin Pieuchot
On 16/07/19(Tue) 21:35, Alexander Bluhm wrote: > Hi, > > When the kernel reaches the sysclt kern.maxclusters limit, operations > get stuck while holding the net lock. Increasing the limit does > not help as there is no wakeup of the pools. So run through the > mbuf pool request list when the lim

Re: ETHER_IS_BCASTADDR() / ETHER_IS_ANYADDR()

2019-07-16 Thread Martin Pieuchot
On 15/07/19(Mon) 15:29, Todd C. Miller wrote: > On Mon, 15 Jul 2019 18:21:28 -0300, Martin Pieuchot wrote: > > > We have many home brewed ways to check Ethernet addresses. This diff > > introduces two macros similar to ETHER_IS_MULTICAST() and make use of > > them in bridge(4) and generic Etherne

unveil unused parameter rootvnode

2019-07-16 Thread Alexander Bluhm
Hi, The function unveil_add_vnode() does not use the parameter rootvnode. It is even more confusing as rootvnode is also a global variable. ok? bluhm Index: kern/kern_unveil.c === RCS file: /data/mirror/openbsd/cvs/src/sys/kern/ker

Re: vfs_lookup: return on read-only file systems

2019-07-16 Thread Alexander Bluhm
On Tue, Jul 16, 2019 at 02:34:52PM +0200, Klemens Nanni wrote: > Rebased diff after bluhm's conflicting realpath/POSIX fix. I have seen a similar problem with immuatble chflags(2). # rm /etc/hosts # chflags uchg /etc # ifconfig vio0 ifconfig: unveil: Operation not permitted Adding EPERM to the l

Re: grep -ob: behave like ggrep, adapt documentation

2019-07-16 Thread Ted Unangst
Christopher Zimmermann wrote: > Hi, > > I just tried to find the byte position of a string within a binary file > using grep. Our base grep -bo let me down because it will only display > the position of the '\n' delimited line, not the position of the > pattern. > > That's what our grep(1) says:

grep -ob: behave like ggrep, adapt documentation

2019-07-16 Thread Christopher Zimmermann
Hi, I just tried to find the byte position of a string within a binary file using grep. Our base grep -bo let me down because it will only display the position of the '\n' delimited line, not the position of the pattern. That's what our grep(1) says: -b The offset in bytes of a matched patte

Re: bgpd adj-rib-out rewrite

2019-07-16 Thread Sebastian Benoit
Claudio Jeker(cje...@diehard.n-r-g.com) on 2019.07.10 22:08:38 +0200: > This diff is a bit of a monster. It changes the Adj-RIB-Out to be a peer > specific set of RB trees instead of using a rib in the original sense. > The reason for this is that the more peers a system has the more elements > end

pool for pfkey pcb

2019-07-16 Thread Alexander Bluhm
Hi, Convert struct pkpcb malloc(9) to pool_get(9). PCB for pfkey is only used in process context, so pass PR_WAITOK to pool_init(9). The possible sleep in pool_put(9) should not hurt, as pfkeyv2_detach() is only called by soclose(9). ok? bluhm Index: net/pfkeyv2.c =

mbuf cluster limit pool wakeup

2019-07-16 Thread Alexander Bluhm
Hi, When the kernel reaches the sysclt kern.maxclusters limit, operations get stuck while holding the net lock. Increasing the limit does not help as there is no wakeup of the pools. So run through the mbuf pool request list when the limit changes. There seem to more problems when recovering fr

Re: bgpd adj-rib-out rewrite

2019-07-16 Thread Job Snijders
On Wed, Jul 10, 2019 at 10:08:38PM +0200, Claudio Jeker wrote: > This diff is a bit of a monster. It changes the Adj-RIB-Out to be a > peer specific set of RB trees instead of using a rib in the original > sense. The reason for this is that the more peers a system has the > more elements end up bei

Re: vfs_lookup: return on read-only file systems

2019-07-16 Thread Klemens Nanni
Rebased diff after bluhm's conflicting realpath/POSIX fix. Index: kern/vfs_lookup.c === RCS file: /cvs/src/sys/kern/vfs_lookup.c,v retrieving revision 1.79 diff -u -p -r1.79 vfs_lookup.c --- kern/vfs_lookup.c 15 Jul 2019 14:56:45 -0

Re: rfc: let etherip(4) depend on another interface for link state

2019-07-16 Thread Stefan Sperling
On Tue, Jul 16, 2019 at 08:29:11PM +1000, David Gwynne wrote: > is there something obvious im missing here? how else do i make the > backup bridge not transmit to the other DC? A workaround which does not involve kernel hacking could be to monitor carp state with ifstated(8) and have it put etheri

rfc: let etherip(4) depend on another interface for link state

2019-07-16 Thread David Gwynne
this is not a request for oks, this is me backing up a hack i did to fix a problem i needed a quick solution for. we're in the process of moving a bunch of boxes to a new site, and are lucky that we can take our address space with us. to let us gradually migrate hosts i want to stretch the layer 2