Re: route_output M_WAITOK

2017-03-02 Thread Martin Pieuchot
On 03/03/17(Fri) 01:40, Alexander Bluhm wrote: > On Thu, Mar 02, 2017 at 10:55:41AM +0100, Martin Pieuchot wrote: > > Actually the malloc(9) could be converted to M_WAIT like the one in > > rt_report() that claudio@ commented like that: > > So let's do that. This avoids that we loose routing mes

ntp_update_second - removed unused var

2017-03-02 Thread David Hill
Hello - time_t *sec is unused in ntp_update_second. OK? Index: kern/kern_tc.c === RCS file: /cvs/src/sys/kern/kern_tc.c,v retrieving revision 1.30 diff -u -p -r1.30 kern_tc.c --- kern/kern_tc.c 9 Feb 2017 20:15:28 - 1.

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

route_output M_WAITOK

2017-03-02 Thread Alexander Bluhm
On Thu, Mar 02, 2017 at 10:55:41AM +0100, Martin Pieuchot wrote: > Actually the malloc(9) could be converted to M_WAIT like the one in > rt_report() that claudio@ commented like that: So let's do that. This avoids that we loose routing messages due to low memory. Note that we cannot wait in m_c

Re: vmd + httpd + meta-data

2017-03-02 Thread noah pugsley
On the Github page, there is a typo in the cloudstack link. It is " http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/virtual%5C_machines.html#user-data-and-meta-data"; but should be " http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/virtu

Re: [PATCH] Minor spelling fixes throughout gcc md files

2017-03-02 Thread Carlos E. Garcia
On 03/02, Jonathan Gray wrote: > On Wed, Mar 01, 2017 at 04:45:33PM -0500, Carlos E. Garcia wrote: > > Greetings, > > > > Here follows some minor spelling fixes found in markdown files inside > > the gcc folder. Wanted something simple for my first patch. > > > > Any insight or comments? > > We

Re: priq: proposed change in the behavior

2017-03-02 Thread Mike Belopuhov
On Thu, Mar 02, 2017 at 14:23 +0100, Mike Belopuhov wrote: > On Thu, Mar 02, 2017 at 10:35 +1000, David Gwynne wrote: > > the current code has been very careful not to free an mbuf while > > holding the ifq mutex. i would prefer to keep it that way. > > > > the least worst way to do that would be

Re: connect(2) EPERM

2017-03-02 Thread Renato Westphal
2017-03-02 12:03 GMT-03:00 Sebastian Benoit : > > EPERM on connect(2) can happen in netinet/tcp_output.c on a socket with > TF_SIGNATURE. As far as i can see its the only EPERM on tcp connect(). > > how far down the stack do we go when documenting errors? > > ok? > > diff --git lib/libc/sys/connect

Re: priq: proposed change in the behavior

2017-03-02 Thread Mike Belopuhov
On 2 March 2017 at 02:52, Mike Belopuhov wrote: > no, actually dropping one mbuf on enqueue still holds, but i'll need > to drop several on dequeue. not sure yet how to properly do that > outside of an ifq lock though. I think I've found a non-intrusive solution for this one: http://gir.theapt.o

Re: Last global IPv6 address list conversion

2017-03-02 Thread Alexander Bluhm
On Thu, Mar 02, 2017 at 11:41:00AM +0100, Martin Pieuchot wrote: > ok? OK bluhm@ > > Index: netinet6/nd6.c > === > RCS file: /cvs/src/sys/netinet6/nd6.c,v > retrieving revision 1.204 > diff -u -p -r1.204 nd6.c > --- netinet6/nd6.c

Re: Global list of IPv6 addresses & prefix list

2017-03-02 Thread Alexander Bluhm
On Thu, Mar 02, 2017 at 11:30:41AM +0100, Martin Pieuchot wrote: > ok? OK bluhm@ > > Index: netinet6/nd6_rtr.c > === > RCS file: /cvs/src/sys/netinet6/nd6_rtr.c,v > retrieving revision 1.155 > diff -u -p -r1.155 nd6_rtr.c > --- neti

Re: connect(2) EPERM

2017-03-02 Thread Alexander Bluhm
On Thu, Mar 02, 2017 at 04:03:28PM +0100, Sebastian Benoit wrote: > EPERM on connect(2) can happen in netinet/tcp_output.c on a socket with > TF_SIGNATURE. As far as i can see its the only EPERM on tcp connect(). I could no find another EPERM in this path either. > how far down the stack do we go

Re: priq: convert to mbuf lists

2017-03-02 Thread Alexander Bluhm
On Thu, Mar 02, 2017 at 12:19:44PM +0100, Mike Belopuhov wrote: > Here's an updated diff with suggestions from bluhm@ and it's > even slimmer now but I don't mind either way. If David isn't > comfortable with this change, we don't have to do it. OK bluhm@

connect(2) EPERM

2017-03-02 Thread Sebastian Benoit
EPERM on connect(2) can happen in netinet/tcp_output.c on a socket with TF_SIGNATURE. As far as i can see its the only EPERM on tcp connect(). how far down the stack do we go when documenting errors? ok? diff --git lib/libc/sys/connect.2 lib/libc/sys/connect.2 index 9c0cfb09d79..6f18e09cddf 100

a new libc function: recallocarray(3)

2017-03-02 Thread Otto Moerbeek
Hi, this introduces a new allocation function thet blends calloc(3) and reallocarray(4) with the additional feature that released memory (to the libc malloc cache) is always cleared. This is primarily usesful for resizing objects holding sensitive data like keys. The presented portable implementa

Re: priq: proposed change in the behavior

2017-03-02 Thread Mike Belopuhov
On Thu, Mar 02, 2017 at 10:35 +1000, David Gwynne wrote: > the current code has been very careful not to free an mbuf while > holding the ifq mutex. i would prefer to keep it that way. > > the least worst way to do that would be to return the mbuf to be > dropped for ifq_enqueue to free. this is c

11n hostap: make HT protection dynamic

2017-03-02 Thread Stefan Sperling
OpenBSD 11n APs currently enforce HT protection (RTS) for all frames. This made the initial 11n hostap implementation easier for me. Sending RTS frames implies unnecessary overhead for data frames. HT protection is only required if any non-HT devices (11a/b/g) are around. Our node cache contains i

Re: priq: convert to mbuf lists

2017-03-02 Thread Mike Belopuhov
On Thu, Mar 02, 2017 at 10:11 +0100, Martin Pieuchot wrote: > On 02/03/17(Thu) 01:16, Mike Belopuhov wrote: > > On 2 March 2017 at 00:56, David Gwynne wrote: > > > > > >> On 2 Mar 2017, at 06:43, Mike Belopuhov wrote: > > >> > > >> This convers hand rolled lists into exactly the same mbuf_lists.

Re: fix a typo in lib/libtls/man/tls_config_verify.3

2017-03-02 Thread Jason McIntyre
On Thu, Mar 02, 2017 at 11:44:59AM +0100, Robert Klein wrote: > Hi, > > this is just a small fix for a typo in the manpage for > tls_config_verify. > > Best regards > Robert > fixed, thanks. jmc > > Index: tls_config_verify.3 > =

fix a typo in lib/libtls/man/tls_config_verify.3

2017-03-02 Thread Robert Klein
Hi, this is just a small fix for a typo in the manpage for tls_config_verify. Best regards Robert Index: tls_config_verify.3 === RCS file: /cvs/src/lib/libtls/man/tls_config_verify.3,v retrieving revision 1.3 diff -u -p -r1.3 tls_c

Last global IPv6 address list conversion

2017-03-02 Thread Martin Pieuchot
This ugly loop correspond to ndp(8)'s purge functionality. Hopefully this will go away when moving autoconf code to userland. In the meantime this conversion will allow me to get rid of one more global list. ok? Index: netinet6/nd6.c =

Global list of IPv6 addresses & prefix list

2017-03-02 Thread Martin Pieuchot
Prefer the global list of interfaces that will stay. I know one line is >80 chars with this diff, I'll rename find_pfxlist_reachable_router() to pfxrtr_find_reachable() for consistency afterward. This should be enough. ok? Index: netinet6/nd6_rtr.c ==

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: Fix broken example link in packages.7

2017-03-02 Thread Raf Czlonka
On Wed, Mar 01, 2017 at 10:39:08PM GMT, Frederic Cambus wrote: > On Tue, Feb 28, 2017 at 09:14:49PM +, Stuart Henderson wrote: > > On 2017/02/28 20:28, Frederic Cambus wrote: > > > Hi tech@, > > > > > > In packages.7, PKG_PATH points to a broken link. This diff fixes it. > > > > https is goin

Re: priq: convert to mbuf lists

2017-03-02 Thread Martin Pieuchot
On 02/03/17(Thu) 01:16, Mike Belopuhov wrote: > On 2 March 2017 at 00:56, David Gwynne wrote: > > > >> On 2 Mar 2017, at 06:43, Mike Belopuhov wrote: > >> > >> This convers hand rolled lists into exactly the same mbuf_lists. > >> I need this because of the next diff that uses the ml_len packet >

Re: Global list of IPv6 addresses & icmp6

2017-03-02 Thread Martin Pieuchot
On 01/03/17(Wed) 22:52, Alexander Bluhm wrote: > On Wed, Mar 01, 2017 at 12:39:56PM +0100, Martin Pieuchot wrote: > > Like for IPv4, I'd like to get rid of this global list. The reason is > > that having fewer global data structures means fewer locking. > > > > Here's a trivial conversion to use