Re: amd64 assembly "fixes" for clang

2016-12-19 Thread Mike Larkin
On Sun, Dec 18, 2016 at 07:31:55PM +0100, Mark Kettenis wrote: > Generating mixed 16-bit/32-bit/64-bit code with clang's integrated > assembler is a bit tricky. It supports the .code16, .code32 and > .code64 directives. But it doesn't know about the data16/data32 and > addr16/addr32 instruction

Re: pool_put() and splsoftnet()

2016-12-19 Thread Mark Kettenis
> Date: Mon, 19 Dec 2016 16:55:40 +0100 > From: Martin Pieuchot > > tcpcb_pool is initialized with IPL_SOFTNET as ipl, so it seems redundant > to call pool_put() under splsoftnet()/splx(). > > ok? ok kettenis@ > Index: netinet/tcp_subr.c >

Re: pool_put() and splsoftnet()

2016-12-19 Thread Mike Belopuhov
On 19 December 2016 at 16:55, Martin Pieuchot wrote: > tcpcb_pool is initialized with IPL_SOFTNET as ipl, so it seems redundant > to call pool_put() under splsoftnet()/splx(). > > ok? > Sure.

pool_put() and splsoftnet()

2016-12-19 Thread Martin Pieuchot
tcpcb_pool is initialized with IPL_SOFTNET as ipl, so it seems redundant to call pool_put() under splsoftnet()/splx(). ok? Index: netinet/tcp_subr.c === RCS file: /cvs/src/sys/netinet/tcp_subr.c,v retrieving revision 1.156 diff -u

Re: build libc++ and libc++abi with clang

2016-12-19 Thread Mark Kettenis
> Date: Mon, 19 Dec 2016 14:48:42 +0100 > From: Patrick Wildt > > Hi, > > GCC from ports can bootstrap libc++ and libc++abi, but on ARM it does > not work since the assembly cannot be parsed by our binutils. In a > clang world we use clang's integrated assembler. This means

Re: gre(4) needs the NET_LOCK()

2016-12-19 Thread Alexander Bluhm
On Mon, Dec 19, 2016 at 11:54:43AM +0100, Martin Pieuchot wrote: > Sending keep alive ends up in ip_output(), so it needs the NET_LOCK(). > > ok? OK bluhm@ > > Index: net/if_gre.c > === > RCS file: /cvs/src/sys/net/if_gre.c,v >

Re: bridge(4), IPSEC and splsoftnet()

2016-12-19 Thread Alexander Bluhm
On Mon, Dec 19, 2016 at 11:50:16AM +0100, Martin Pieuchot wrote: > bridge_ipsec() is always called at IPL_SOFTNET, so assert that rather > than calling splsoftnet() recursively. > > ok? OK bluhm@ > > Index: net/if_bridge.c > === >

Re: udp{,6}_output() and splsoftnet()

2016-12-19 Thread Alexander Bluhm
On Mon, Dec 19, 2016 at 12:25:03PM +0100, Martin Pieuchot wrote: > These functions are only called by udp_usrreq() which is always called > with the NET_LOCK() held, so kill redundant splsoftnet(). > > ok? OK bluhm@ > > Index: netinet/udp_usrreq.c >

Re: pfsync(4) needs the NET_LOCK()

2016-12-19 Thread Alexander Bluhm
On Mon, Dec 19, 2016 at 11:46:32AM +0100, Martin Pieuchot wrote: > These timeouts can end up in ip_output(). So they need the NET_LOCK(). > > ok? OK bluhm@ > > Index: net/if_pfsync.c > === > RCS file:

lld on OpenBSD

2016-12-19 Thread Mark Kettenis
Seems lld, the linker that's more or less part of llvm, is getting in some sort of usable state. The diff below adds code to handle the OpenBSD shared library versioning scheme. I intend to push this upstream, which is likely to require some further changes. But having this diff out there can't

build clang with clang if not otherwise specified

2016-12-19 Thread Patrick Wildt
Hi, similarly to libc++ and libc++abi, we want to compile clang with clang and not rely on an external bootstrap compiler. Only if CC and CXX are overwriten to use egcc/eg++, we need to use those. That's needed for the initial bootstrap. Not sure the diff is clean enough. One could do

build libc++ and libc++abi with clang

2016-12-19 Thread Patrick Wildt
Hi, GCC from ports can bootstrap libc++ and libc++abi, but on ARM it does not work since the assembly cannot be parsed by our binutils. In a clang world we use clang's integrated assembler. This means if we use clang to compile it on ARM, it works. I only set CXX to eg++ since I wanted it to

udp{,6}_output() and splsoftnet()

2016-12-19 Thread Martin Pieuchot
These functions are only called by udp_usrreq() which is always called with the NET_LOCK() held, so kill redundant splsoftnet(). ok? Index: netinet/udp_usrreq.c === RCS file: /cvs/src/sys/netinet/udp_usrreq.c,v retrieving revision

Re: Some tweaks for smfb(4)

2016-12-19 Thread Mark Kettenis
> Date: Mon, 19 Dec 2016 11:07:19 +0100 > From: Frederic Cambus > > Hi tech@, > > Here is a diff with some tweaks for smfb(4): > > - Display resolution and color depth when attaching We should try to do so in a uniform way though. None of our drivers print the words "frame

bridge(4), IPSEC and splsoftnet()

2016-12-19 Thread Martin Pieuchot
bridge_ipsec() is always called at IPL_SOFTNET, so assert that rather than calling splsoftnet() recursively. ok? Index: net/if_bridge.c === RCS file: /cvs/src/sys/net/if_bridge.c,v retrieving revision 1.289 diff -u -p -r1.289

gre(4) needs the NET_LOCK()

2016-12-19 Thread Martin Pieuchot
Sending keep alive ends up in ip_output(), so it needs the NET_LOCK(). ok? Index: net/if_gre.c === RCS file: /cvs/src/sys/net/if_gre.c,v retrieving revision 1.81 diff -u -p -r1.81 if_gre.c --- net/if_gre.c16 Nov 2016

pfsync(4) needs the NET_LOCK()

2016-12-19 Thread Martin Pieuchot
These timeouts can end up in ip_output(). So they need the NET_LOCK(). ok? Index: net/if_pfsync.c === RCS file: /cvs/src/sys/net/if_pfsync.c,v retrieving revision 1.238 diff -u -p -r1.238 if_pfsync.c --- net/if_pfsync.c 22 Nov

Some tweaks for smfb(4)

2016-12-19 Thread Frederic Cambus
Hi tech@, Here is a diff with some tweaks for smfb(4): - Display resolution and color depth when attaching - Do not hardcode 'wantrows' and 'wantcols' when calling rasops_init Comments? OK? Index: sys/arch/loongson/dev/smfb.c ===

Re: kernel diagnostic assertion "ifa == rt->rt_ifa", rt_ifa_addlocal

2016-12-19 Thread Stefan Sperling
On Sun, Dec 18, 2016 at 10:40:47PM +0100, Alexander Bluhm wrote: > The mess made me send an incorrect diff. In case that both if_ioctl() > and rt_ifa_addlocal() fail, we could still end in an inconsistent > sate. > > I think this is better. Still ok? Yes, it's fine. > bluhm > > Index: