Re: PF_ROUTE vs NET_LOCK(), take 2

2017-03-06 Thread Alexander Bluhm
On Mon, Mar 06, 2017 at 01:33:19PM +0100, Martin Pieuchot wrote: > After some refactoring, here's the updated diff to take the routing > sockets out of the NET_LOCK(). > > ok? OK bluhm@ > > Index: net/raw_usrreq.c > === > RCS file:

PF_ROUTE vs NET_LOCK(), take 2

2017-03-06 Thread Martin Pieuchot
After some refactoring, here's the updated diff to take the routing sockets out of the NET_LOCK(). ok? Index: net/raw_usrreq.c === RCS file: /cvs/src/sys/net/raw_usrreq.c,v retrieving revision 1.29 diff -u -p -r1.29 raw_usrreq.c ---

Re: PF_ROUTE vs NET_LOCK()

2017-03-02 Thread Alexander Bluhm
On Thu, Mar 02, 2017 at 10:55:41AM +0100, Martin Pieuchot wrote: > Sleeping here is completely ok. The NET_LOCK() in this function is only > taken to make sure no other thread will try to do a route lookup in > ip_output() while we're messing with the routing table. Then I think your change is ok

Re: PF_ROUTE vs NET_LOCK()

2017-03-02 Thread Martin Pieuchot
On 01/03/17(Wed) 18:17, Alexander Bluhm wrote: > On Tue, Feb 28, 2017 at 01:28:45PM +0100, Martin Pieuchot wrote: > > Routing sockets do not really need the NET_LOCK(), only route_output() > > needs it. > > That depends what the future use of the netlock will be. route_input() > is called from tc

Re: PF_ROUTE vs NET_LOCK()

2017-03-01 Thread Alexander Bluhm
On Tue, Feb 28, 2017 at 01:28:45PM +0100, Martin Pieuchot wrote: > Routing sockets do not really need the NET_LOCK(), only route_output() > needs it. That depends what the future use of the netlock will be. route_input() is called from tcp, icmp, arp timers. Currently they have kernel lock, but

PF_ROUTE vs NET_LOCK()

2017-02-28 Thread Martin Pieuchot
Routing sockets do not really need the NET_LOCK(), only route_output() needs it. This diff change the socket layer to treat PF_ROUTE sockets just like PF_LOCAL ones. While here fix a rtentry leak in the error path of route_output(). Comments, oks? Index: net/raw_usrreq.c ===