Re: if attach/detach netlocks

2017-01-03 Thread Mike Belopuhov
On 3 January 2017 at 12:06, Reyk Floeter wrote: > On Tue, Jan 03, 2017 at 11:42:21AM +0100, Martin Pieuchot wrote: >> On 02/01/17(Mon) 21:51, Mike Belopuhov wrote: >> > I got to test the diff and I had to make another adjustment: >> > vxlan_if_change is setup as a detach hook,

Re: if attach/detach netlocks

2017-01-03 Thread Reyk Floeter
On Tue, Jan 03, 2017 at 11:42:21AM +0100, Martin Pieuchot wrote: > On 02/01/17(Mon) 21:51, Mike Belopuhov wrote: > > On Fri, Dec 30, 2016 at 18:57 +0100, Mike Belopuhov wrote: > > > On Thu, Dec 29, 2016 at 09:30 +0100, Martin Pieuchot wrote: > > > > On 29/12/16(Thu) 01:15, Alexander Bluhm wrote: >

Re: if attach/detach netlocks

2017-01-03 Thread Martin Pieuchot
On 02/01/17(Mon) 21:51, Mike Belopuhov wrote: > On Fri, Dec 30, 2016 at 18:57 +0100, Mike Belopuhov wrote: > > On Thu, Dec 29, 2016 at 09:30 +0100, Martin Pieuchot wrote: > > > On 29/12/16(Thu) 01:15, Alexander Bluhm wrote: > > > > On Fri, Dec 23, 2016 at 12:09:32AM +0100, Martin Pieuchot wrote: >

Re: if attach/detach netlocks

2017-01-02 Thread Mike Belopuhov
On Fri, Dec 30, 2016 at 18:57 +0100, Mike Belopuhov wrote: > On Thu, Dec 29, 2016 at 09:30 +0100, Martin Pieuchot wrote: > > On 29/12/16(Thu) 01:15, Alexander Bluhm wrote: > > > On Fri, Dec 23, 2016 at 12:09:32AM +0100, Martin Pieuchot wrote: > > > > On 22/12/16(Thu) 20:45, Mike Belopuhov wrote: >

Re: if attach/detach netlocks

2016-12-30 Thread Mike Belopuhov
On Thu, Dec 29, 2016 at 09:30 +0100, Martin Pieuchot wrote: > On 29/12/16(Thu) 01:15, Alexander Bluhm wrote: > > On Fri, Dec 23, 2016 at 12:09:32AM +0100, Martin Pieuchot wrote: > > > On 22/12/16(Thu) 20:45, Mike Belopuhov wrote: > > > > I think this is what is required here. Works here, but

Re: if attach/detach netlocks

2016-12-29 Thread Martin Pieuchot
On 29/12/16(Thu) 01:15, Alexander Bluhm wrote: > On Fri, Dec 23, 2016 at 12:09:32AM +0100, Martin Pieuchot wrote: > > On 22/12/16(Thu) 20:45, Mike Belopuhov wrote: > > > I think this is what is required here. Works here, but YMMV. > > > > splnet() in a pseudo-driver seems completely wrong, you

Re: if attach/detach netlocks

2016-12-28 Thread Alexander Bluhm
On Fri, Dec 23, 2016 at 12:09:32AM +0100, Martin Pieuchot wrote: > On 22/12/16(Thu) 20:45, Mike Belopuhov wrote: > > I think this is what is required here. Works here, but YMMV. > > splnet() in a pseudo-driver seems completely wrong, you could get rid of > it. Yes, but that is another issue.

Re: if attach/detach netlocks

2016-12-22 Thread Martin Pieuchot
On 22/12/16(Thu) 20:45, Mike Belopuhov wrote: > On Wed, Dec 21, 2016 at 13:06 +0100, Alexander Bluhm wrote: > > On Wed, Dec 21, 2016 at 12:45:37PM +0100, Mike Belopuhov wrote: > > > Anyways, OK for the diff below? > > > > OK bluhm@ > > > > > diff --git sys/net/if_pflow.c sys/net/if_pflow.c > > >

Re: if attach/detach netlocks

2016-12-22 Thread Mike Belopuhov
On Wed, Dec 21, 2016 at 13:06 +0100, Alexander Bluhm wrote: > On Wed, Dec 21, 2016 at 12:45:37PM +0100, Mike Belopuhov wrote: > > Anyways, OK for the diff below? > > OK bluhm@ > > > diff --git sys/net/if_pflow.c sys/net/if_pflow.c > > index 0df0b69fd8a..8592d98a743 100644 > > ---

Re: if attach/detach netlocks

2016-12-21 Thread Alexander Bluhm
On Tue, Dec 20, 2016 at 07:33:35PM +0100, Martin Pieuchot wrote: > On 20/12/16(Tue) 18:47, Mike Belopuhov wrote: > > On Tue, Dec 20, 2016 at 17:06 +0100, Martin Pieuchot wrote: > > > > > > You'll need to release the lock before calling ifc->ifc_create in > > > if_clone_create() and do the same

Re: if attach/detach netlocks

2016-12-21 Thread Alexander Bluhm
On Wed, Dec 21, 2016 at 12:45:37PM +0100, Mike Belopuhov wrote: > Anyways, OK for the diff below? OK bluhm@ > diff --git sys/net/if_pflow.c sys/net/if_pflow.c > index 0df0b69fd8a..8592d98a743 100644 > --- sys/net/if_pflow.c > +++ sys/net/if_pflow.c > @@ -265,14 +265,11 @@

Re: if attach/detach netlocks

2016-12-21 Thread Mike Belopuhov
On Wed, Dec 21, 2016 at 00:13 +0100, Alexander Bluhm wrote: > On Tue, Dec 20, 2016 at 06:47:31PM +0100, Mike Belopuhov wrote: > > @@ -1109,11 +1115,16 @@ if_clone_destroy(const char *name) > > s = splnet(); > > if_down(ifp); > > splx(s); > > } > > > > -

Re: if attach/detach netlocks

2016-12-20 Thread Alexander Bluhm
On Tue, Dec 20, 2016 at 06:47:31PM +0100, Mike Belopuhov wrote: > @@ -1109,11 +1115,16 @@ if_clone_destroy(const char *name) > s = splnet(); > if_down(ifp); > splx(s); > } > > - return ((*ifc->ifc_destroy)(ifp)); > + /* XXXSMP breaks

Re: if attach/detach netlocks

2016-12-20 Thread Martin Pieuchot
On 20/12/16(Tue) 18:47, Mike Belopuhov wrote: > On Tue, Dec 20, 2016 at 17:06 +0100, Martin Pieuchot wrote: > > > > You'll need to release the lock before calling ifc->ifc_create in > > if_clone_create() and do the same dance in if_clone_destroy(). > > > > Indeed. > > > But I think that's the

Re: if attach/detach netlocks

2016-12-20 Thread Mike Belopuhov
On Tue, Dec 20, 2016 at 17:06 +0100, Martin Pieuchot wrote: > > You'll need to release the lock before calling ifc->ifc_create in > if_clone_create() and do the same dance in if_clone_destroy(). > Indeed. > But I think that's the way to go. If you can create/destroy > pseudo-interface without

Re: if attach/detach netlocks

2016-12-20 Thread Martin Pieuchot
On 20/12/16(Tue) 16:33, Mike Belopuhov wrote: > Attach: > > splassert: sowakeup: want 1 have 0 > Starting stack trace... > sowakeup() at sowakeup+0x41 > sorwakeup() at sorwakeup+0xb4 > route_input() at route_input+0x2d7 > if_attach() at if_attach+0x58 > xnf_attach() at

if attach/detach netlocks

2016-12-20 Thread Mike Belopuhov
Attach: splassert: sowakeup: want 1 have 0 Starting stack trace... sowakeup() at sowakeup+0x41 sorwakeup() at sorwakeup+0xb4 route_input() at route_input+0x2d7 if_attach() at if_attach+0x58 xnf_attach() at xnf_attach+0x45f config_attach() at config_attach+0x1bc