Re: un-KERNEL_LOCK() TCP/UDP input & co

2017-11-14 Thread Visa Hankala
On Tue, Nov 14, 2017 at 10:37:16AM +0100, Martin Pieuchot wrote: > Note that the diff below still includes a false positive. If the > current thread doesn't have the read-lock but another one has it, > then RW_READ will still be returned. That's true if witness(4) has not been enabled.

Re: un-KERNEL_LOCK() TCP/UDP input & co

2017-11-14 Thread Martin Pieuchot
On 13/11/17(Mon) 17:29, Visa Hankala wrote: > On Mon, Nov 13, 2017 at 01:25:42PM +0100, Martin Pieuchot wrote: > > I'd love is somebody could do the changes in the rwlock API to let us > > check if we're holding a lock. Maybe this is already present in > > witness(4), visa? > > witness(4) does

Re: un-KERNEL_LOCK() TCP/UDP input & co

2017-11-13 Thread Visa Hankala
On Mon, Nov 13, 2017 at 01:25:42PM +0100, Martin Pieuchot wrote: > I'd love is somebody could do the changes in the rwlock API to let us > check if we're holding a lock. Maybe this is already present in > witness(4), visa? witness(4) does maintain data about lock ownership. The patch below might

Re: un-KERNEL_LOCK() TCP/UDP input & co

2017-11-13 Thread Alexandr Nedvedicky
Hello, > > So I'd like to know, what's the plan for NET_ASSERT_LOCKED() macro? > > > > a) are we going to relax it, so it will test if the net_lock is > > locked? > > Yep, that's already done. cool, thanks a lot. I've just noticed the change is there while ago, while

Re: un-KERNEL_LOCK() TCP/UDP input & co

2017-11-13 Thread Martin Pieuchot
On 13/11/17(Mon) 12:14, Alexandr Nedvedicky wrote: > your change looks good to me. Though I have a comment/question to your diff. > > > Index: net/if_vxlan.c > > === > > RCS file: /cvs/src/sys/net/if_vxlan.c,v > > retrieving revision

Re: un-KERNEL_LOCK() TCP/UDP input & co

2017-11-13 Thread Alexandr Nedvedicky
Hello, your change looks good to me. Though I have a comment/question to your diff. > Index: net/if_vxlan.c > === > RCS file: /cvs/src/sys/net/if_vxlan.c,v > retrieving revision 1.63 > diff -u -p -r1.63 if_vxlan.c > ---

un-KERNEL_LOCK() TCP/UDP input & co

2017-11-08 Thread Martin Pieuchot
After auditing all the pr_input() functions, the only missing bits for taking them out of the KERNEL_LOCK() are: ``etheripstat''. I leave such counter conversions for somebody else (8 In the meantime I annotated globals used in these functions. Most of the pseudo-interfaces have a global list