Re: vlan tagging surgery

2014-04-21 Thread Martin Pieuchot
On 21/04/14(Mon) 11:14, Claudio Jeker wrote: [...] Would it make sense to put this into a vlan_encap function so that we can reduce the amount of layer violation here? I think it makes sense. #if NVLAN 0 if (ifp-if_type == IFT_L2VLAN) return vlan_encap(ifp, m);

Remove rti_ifp from struct rt_addrinfo

2014-04-24 Thread Martin Pieuchot
This ifp pointer is only needed by rt_getifa() to find an address, so make it a local variable. The rtrequest1(9) change might introduce a negligible slowdown since I remove the already known ifp pointer. But this only happens in the case described in the comment just before and I would bet

Re: Remove rti_ifp from struct rt_addrinfo

2014-04-24 Thread Martin Pieuchot
On 24/04/14(Thu) 13:43, Henning Brauer wrote: * Martin Pieuchot mpieuc...@nolizard.org [2014-04-24 13:24]: This ifp pointer is only needed by rt_getifa() to find an address, so make it a local variable. The rtrequest1(9) change might introduce a negligible slowdown since I remove

Kill in_localaddr()

2014-04-24 Thread Martin Pieuchot
in_localaddr() is used only once in our tree and only if the sysctl net.inet.ip.mtudisc is set to 0. It is used to optimize the size of the MSS if the forward address correspond to a host on one of our subnets. Since it's an optimization for a special case that's not enabled by default, I'd like

Re: Remove rti_ifp from struct rt_addrinfo

2014-04-24 Thread Martin Pieuchot
On 24/04/14(Thu) 18:17, Alexander Bluhm wrote: On Thu, Apr 24, 2014 at 01:43:16PM +0200, Henning Brauer wrote: * Martin Pieuchot mpieuc...@nolizard.org [2014-04-24 13:24]: This ifp pointer is only needed by rt_getifa() to find an address, so make it a local variable. The rtrequest1

Re: Kill in_localaddr()

2014-04-25 Thread Martin Pieuchot
On 25/04/14(Fri) 10:58, Stuart Henderson wrote: On 2014/04/24 16:41, Martin Pieuchot wrote: in_localaddr() is used only once in our tree and only if the sysctl net.inet.ip.mtudisc is set to 0. It is used to optimize the size of the MSS if the forward address correspond to a host on one

There's no need for the link-layer address in the RB-tree...

2014-04-25 Thread Martin Pieuchot
...actually we don't even need it for the per-ifp address list! This is a result of my recent RTAX_IFP/sadl cleanup. Historically the link-layer ifa has been the first element of the per-ifp address list. This requirement is no longer necessary since r1.154 of net/route.c, we now use the

Re: There's no need for the link-layer address in the RB-tree...

2014-04-25 Thread Martin Pieuchot
On 25/04/14(Fri) 15:46, Martin Pieuchot wrote: [...] Regarding the tree, when Henning added ifa_add/del prior to its addition, he also used it for link-layer addresses. But ifa_ifwithaddr() was not dealing with link-layer addresses at that time! So when ifa_add/del got modified to add

ddb, USB keyboard and Apple machines.

2014-04-26 Thread Martin Pieuchot
It's actually impossible to use a USB keyboard to enter ddb(8) on most of the G3/G4 that come with such keyboard since they have a bluetooth HID device that attaches as the console keyboard. I assume this is also the case on various x86 Apple laptops, but I don't have any hardware to test. Diff

Re: p2p interfaces and route to loopback

2014-04-28 Thread Martin Pieuchot
On 09/04/14(Wed) 15:36, Martin Pieuchot wrote: On 09/04/14(Wed) 11:22, Martin Pieuchot wrote: When an IPv6 address is configured on a point-to-point interface, it is associated to nd6_rtrequest(). This is because nd6_request() contains a hack to automatically create a route to loopback

Re: Remove rti_ifp from struct rt_addrinfo

2014-04-28 Thread Martin Pieuchot
On 25/04/14(Fri) 21:05, Henning Brauer wrote: * Ryan McBride mcbr...@openbsd.org [2014-04-25 10:31]: On Fri, Apr 25, 2014 at 02:40:57AM +0200, Alexander Bluhm wrote: On Fri, Apr 25, 2014 at 09:09:03AM +0900, Ryan McBride wrote: Part of the reason it's there is to make carp work properly

Re: p2p interfaces and route to loopback

2014-04-28 Thread Martin Pieuchot
On 28/04/14(Mon) 17:32, Stuart Henderson wrote: On 2014/04/28 17:15, Stuart Henderson wrote: This breaks my setup, # /sbin/route add -inet6 default -ifp pppoe1 fe80:: route: writing to routing socket: Network is unreachable add net default: gateway fe80::: Network is unreachable

Re: p2p interfaces and route to loopback

2014-04-28 Thread Martin Pieuchot
On 28/04/14(Mon) 17:53, Stuart Henderson wrote: On 2014/04/28 18:39, Martin Pieuchot wrote: On 28/04/14(Mon) 17:32, Stuart Henderson wrote: On 2014/04/28 17:15, Stuart Henderson wrote: This breaks my setup, # /sbin/route add -inet6 default -ifp pppoe1 fe80:: route: writing

Re: p2p interfaces and route to loopback

2014-04-28 Thread Martin Pieuchot
On 28/04/14(Mon) 21:51, Stuart Henderson wrote: On 2014/04/28 19:09, Martin Pieuchot wrote: On 28/04/14(Mon) 17:53, Stuart Henderson wrote: On 2014/04/28 18:39, Martin Pieuchot wrote: On 28/04/14(Mon) 17:32, Stuart Henderson wrote: On 2014/04/28 17:15, Stuart Henderson wrote

Re: p2p interfaces and route to loopback

2014-04-29 Thread Martin Pieuchot
On 28/04/14(Mon) 22:57, Martin Pieuchot wrote: On 28/04/14(Mon) 21:51, Stuart Henderson wrote: On 2014/04/28 19:09, Martin Pieuchot wrote: On 28/04/14(Mon) 17:53, Stuart Henderson wrote: On 2014/04/28 18:39, Martin Pieuchot wrote: On 28/04/14(Mon) 17:32, Stuart Henderson wrote

Do not abuse nd6_rtrequest() for p2p interfaces

2014-04-29 Thread Martin Pieuchot
So, I'm resending this diff since the previous bug has been fixed, still looking for oks. On 09/04/14(Wed) 11:22, Martin Pieuchot wrote: When an IPv6 address is configured on a point-to-point interface, it is associated to nd6_rtrequest(). This is because nd6_request() contains a hack

USB *hci(4) freelists

2014-05-04 Thread Martin Pieuchot
In USB land there is a lot of freelists. Every HC driver has one freelist per type of descriptor and the memory allocator used to populate these lists, usb_allocmem(), is a wrapper around bus_dma{mem,map}* that uses two more lists. I don't see the point of having per-softc lists, but maybe

HID parser

2014-05-04 Thread Martin Pieuchot
In December 2012 a user reported on misc@ that the Noppoo Mini Choc 84 USB keyboard does not work on OpenBSD [0]. More recently, mcbride@ and yasuoka@ contacted me because they have a mouse that is not properly recognized. Both issues are related to our HID descriptor parser. The diff below is

ums(4) memory leak

2014-05-04 Thread Martin Pieuchot
Plug a memory leak related to HID descriptor parsing, ok? Index: hidms.c === RCS file: /cvs/src/sys/dev/usb/hidms.c,v retrieving revision 1.5 diff -u -p -r1.5 hidms.c --- hidms.c 9 Aug 2013 22:10:17 - 1.5 +++ hidms.c

Re: There's no need for the link-layer address in the RB-tree...

2014-05-05 Thread Martin Pieuchot
On 25/04/14(Fri) 15:59, Martin Pieuchot wrote: On 25/04/14(Fri) 15:46, Martin Pieuchot wrote: [...] Regarding the tree, when Henning added ifa_add/del prior to its addition, he also used it for link-layer addresses. But ifa_ifwithaddr() was not dealing with link-layer addresses

Re: [Patch] Add router alert option to igmp packets

2014-05-05 Thread Martin Pieuchot
Hello Florian, On 26/04/14(Sat) 22:22, Florian Riehm wrote: On 04/26/14 20:35, Alexander Bluhm wrote: /* * To avoid byte-swapping the same value over and over again. */ FreeBSD has code matching this comment. In OpenBSD the code is gone and so should

wskbd(4) memory leak

2014-05-05 Thread Martin Pieuchot
We leave in a hotpluggable world. Let's free in detach() the memory allocated in attach(). While here I realize that M_TEMP might not be the best type to describe the keymap, M_DEVBUF maybe? Ok? Index: wskbd.c === RCS file:

m-m_pkthdr.rcvif dereference

2014-05-06 Thread Martin Pieuchot
Diff below reduce the number of m-m_pkthdr.rcvif usage in icmp{,6} code. Should introduce no functional change but that will help me with upcoming pointer - index conversion. ok? Index: netinet/ip_icmp.c === RCS file:

Kill {nd6_,}useloopback

2014-05-06 Thread Martin Pieuchot
Using the loopback interface for local traffic is not optional. I wonder if anybody using IPv6 ever turned this sysctl off. I'd be interested to hear from you and see your routing table if you did it. Otherwise, the diff below removes the global variable for IPv4 and the sysctl button for IPv6,

Re: ums(4) memory leak

2014-05-06 Thread Martin Pieuchot
On 06/05/14(Tue) 13:44, Jérémie Courrèges-Anglas wrote: Martin Pieuchot mpieuc...@nolizard.org writes: Plug a memory leak related to HID descriptor parsing, ok? I don't have any ums(4) device but this is obviously right, so ok. I've found this useless check during review: That's

USB sensors leak xfers

2014-05-06 Thread Martin Pieuchot
I don't have any of these devices so I appreciate if people can test this diff. It's basically the same pattern that has been copy/past'd in every driver. The rule is simple: if you uhidev_open() you need to uhidev_close() at some point. Ok? Index: ucycom.c

Remove p2p loopback hack in nd6_rtrequest()

2014-05-07 Thread Martin Pieuchot
Diff below stops abusing nd6_rtrequest() for loopback interfaces, which means we can remove the special hack below and reduce the differences with arp_rtrequest(). This diff introduces two changes in the inet6 routing table, but they should not matter. The first one is that the gateway of the

Re: openbsd-current: cannot suspend -return from zzz-

2014-05-09 Thread Martin Pieuchot
On 09/05/14(Fri) 08:36, Abel Abraham Camarillo Ojeda wrote: On Fri, May 9, 2014 at 4:37 AM, Abel Abraham Camarillo Ojeda acam...@verlet.org wrote: On Thu, Apr 17, 2014 at 4:46 AM, Abel Abraham Camarillo Ojeda acam...@verlet.org wrote: On Tue, Apr 8, 2014 at 5:46 PM, Mike Larkin

Re: openbsd-current: cannot suspend -return from zzz-

2014-05-10 Thread Martin Pieuchot
On 10/05/14(Sat) 12:02, Abel Abraham Camarillo Ojeda wrote: On Fri, May 9, 2014 at 3:12 PM, Abel Abraham Camarillo Ojeda acam...@verlet.org wrote: On Fri, May 9, 2014 at 8:47 AM, Martin Pieuchot mpieuc...@nolizard.org wrote: On 09/05/14(Fri) 08:36, Abel Abraham Camarillo Ojeda wrote

Re: HID parser

2014-05-10 Thread Martin Pieuchot
On 05/05/14(Mon) 04:37, Daniel Bolgheroni wrote: On Sun, May 04, 2014 at 06:11:41PM +0200, Martin Pieuchot wrote: In December 2012 a user reported on misc@ that the Noppoo Mini Choc 84 USB keyboard does not work on OpenBSD [0]. More recently, mcbride@ and yasuoka@ contacted me because

Re: Remove p2p loopback hack in nd6_rtrequest()

2014-05-12 Thread Martin Pieuchot
On 07/05/14(Wed) 12:46, Martin Pieuchot wrote: Diff below stops abusing nd6_rtrequest() for loopback interfaces, which means we can remove the special hack below and reduce the differences with arp_rtrequest(). This diff introduces two changes in the inet6 routing table, but they should

m-m_pkthdr.rcvif and ip6_input()

2014-05-12 Thread Martin Pieuchot
Like the previous diffs, it reduces the number of m-m_pkthdr.rcvif occurrences, this time in ip6_input(). Should be no functional change. Ok? Index: netinet6/ip6_input.c === RCS file: /home/ncvs/src/sys/netinet6/ip6_input.c,v

Re: uchcom(4) did not work

2014-05-14 Thread Martin Pieuchot
On 13/05/14(Tue) 21:24, Mike Larkin wrote: On Wed, May 14, 2014 at 11:02:49AM +0900, SASANO Takayoshi wrote: Hi, Simply magic values are rewrited with #define. If these values need to be disassembled, please take a while... I think we need to understand what those values mean. When

Re: Big routing table diff

2014-05-14 Thread Martin Pieuchot
On 13/05/14(Tue) 19:25, Claudio Jeker wrote: The last three hackathons I got sucked into one ugly dark corner of the network stack. Our radix tree implementation one one particular bug in it that caused bgpd and ospfd to freak out on semi regular basis. Do you know why they would freak out?

Remove lladdrs from the RB-tree

2014-05-15 Thread Martin Pieuchot
Here's an updated diff to remove the link-layer address of every interface from the RB-tree and the per-ifp lists. ok? Index: net/if.c === RCS file: /home/ncvs/src/sys/net/if.c,v retrieving revision 1.288 diff -u -p -r1.288 if.c ---

Re: link-local address issues

2014-05-20 Thread Martin Pieuchot
Hey Paul, On 20/05/14(Tue) 11:33, Paul de Weerd wrote: Hi all, Martin, There seems to be an issue with generating eui64 addresses. Indeed, thanks for reporting the problem. [weerd@pom] $ ifconfig em0 em0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 lladdr

Re: OpenBSD crash with pfsync

2014-05-22 Thread Martin Pieuchot
Hello Loïc, On 22/05/14(Thu) 11:11, Loïc Blot wrote: Hi, today i upgraded my primary router from OpenBSD 5.4 to OpenBSD 5.5 (i follow the process described here: http://www.openbsd.org/faq/upgrade55.html and this is my 5th upgrade from 5.4 to 5.5 since the release). After rebooting and

bge(4): do not malloc(9) ring memory in bge_init()

2014-05-23 Thread Martin Pieuchot
Diff below splits the functions that allocate memory for the various ring to do it only once, in bge_attach(), instead of doing it every time bge_init() is called, possibly in the watchdog function. Tested with a Broadcom BCM5714 rev 0xa3, BCM5715 A3 (0x9003). Comments? Ok? Index: if_bge.c

Create a default local route for every IPv4 address

2014-05-26 Thread Martin Pieuchot
Diff below changes the behavior of the kernel to add a route for every new IPv4 address, when it is configured on an interface. Actually such route is created the first time a program tries to resolve it. That's why with this diff you don't see the cloned flag: -10.3.3.2

USB suspend/resume race

2014-05-26 Thread Martin Pieuchot
It is currently possible to trigger a race between the thread doing DVACT_QUIESCE and the USB thread exploring the buses. This race is really easy to reproduce if you have a lot of controllers and you try to suspend just after resuming. In the best case, it blows your kernel during suspend, in

Re: USB suspend/resume race

2014-05-26 Thread Martin Pieuchot
On 26/05/14(Mon) 13:46, Martin Pieuchot wrote: It is currently possible to trigger a race between the thread doing DVACT_QUIESCE and the USB thread exploring the buses. This race is really easy to reproduce if you have a lot of controllers and you try to suspend just after resuming

Re: Create a default local route for every IPv4 address

2014-05-26 Thread Martin Pieuchot
On 26/05/14(Mon) 08:03, Kenneth Westerback wrote: [...] dhclient used to create such routes but that was removed as useless so I'm not sure why we want/need to add them back. I'm not a routing table guru so perhaps this is different in some way. We want it back to be able to tell if an

PRU_BIND in raw ip

2014-05-27 Thread Martin Pieuchot
Diff below replace in_iawithaddr() + in_broadcast() - ifa_ifwithaddr(), that does the same for IPv4 since broadcast addresses are added to the tree. ok? Index: netinet/raw_ip.c === RCS file: /home/ncvs/src/sys/netinet/raw_ip.c,v

Re: PRU_BIND in raw ip

2014-05-28 Thread Martin Pieuchot
On 28/05/14(Wed) 09:30, Jérémie Courrèges-Anglas wrote: Martin Pieuchot mpieuc...@nolizard.org writes: Diff below replace in_iawithaddr() + in_broadcast() - ifa_ifwithaddr(), that does the same for IPv4 since broadcast addresses are added to the tree. This prevents listeners to bind

Re: Create a default local route for every IPv4 address

2014-05-28 Thread Martin Pieuchot
On 26/05/14(Mon) 15:17, Martin Pieuchot wrote: On 26/05/14(Mon) 08:03, Kenneth Westerback wrote: [...] dhclient used to create such routes but that was removed as useless so I'm not sure why we want/need to add them back. I'm not a routing table guru so perhaps this is different

Re: USB suspend/resume race

2014-05-29 Thread Martin Pieuchot
On 19/01/10(Tue) 01:07, Jean-Philippe Ouellet wrote: On 26/05/14(Mon) 13:46, Martin Pieuchot wrote: I'd appreciate if people having troubles with suspend/resume could try this diff an report back. Fixes it for me! :D Many thanks. You're welcome. Previous diff was lacking the header

in_pcbbind() and in_broadcast/in_iawithaddr

2014-06-02 Thread Martin Pieuchot
This diff is similar to the one that has been committed to handle the SOCK_RAW binding. I'd like to stop using in_iawithaddr() *and* in_broadcast(). Since these functions are just doing an iteration on all the addresses present in the RB-tree (or equivalent), let's use ifa_ifwithaddr() instead.

Re: in_pcbbind() and in_broadcast/in_iawithaddr

2014-06-03 Thread Martin Pieuchot
On 02/06/14(Mon) 15:45, Martin Pieuchot wrote: This diff is similar to the one that has been committed to handle the SOCK_RAW binding. I'd like to stop using in_iawithaddr() *and* in_broadcast(). Since these functions are just doing an iteration on all the addresses present in the RB-tree

Remove a global variable in ip_input

2014-06-04 Thread Martin Pieuchot
ok? Index: netinet/ip_input.c === RCS file: /home/ncvs/src/sys/netinet/ip_input.c,v retrieving revision 1.233 diff -u -p -r1.233 ip_input.c --- netinet/ip_input.c 10 May 2014 12:30:27 - 1.233 +++ netinet/ip_input.c 4 Jun

Re: Remove a global variable in ip_input

2014-06-04 Thread Martin Pieuchot
On 04/06/14(Wed) 12:45, Bret Lambert wrote: On Wed, Jun 04, 2014 at 12:30:58PM +0200, Martin Pieuchot wrote: ok? Seems reasonable enough; are there any alignment issues placing it on the stack? Nop, it's just a structure used to do some address lookups, it's already done like that in other

Re: Create a default local route for every IPv4 address

2014-06-10 Thread Martin Pieuchot
On 28/05/14(Wed) 16:15, Martin Pieuchot wrote: On 26/05/14(Mon) 15:17, Martin Pieuchot wrote: On 26/05/14(Mon) 08:03, Kenneth Westerback wrote: [...] dhclient used to create such routes but that was removed as useless so I'm not sure why we want/need to add them back. I'm

carp(4) dead code

2014-06-26 Thread Martin Pieuchot
There's no way to have a negative number of addresses configured on a carp(4) interface. This hack might have been required in the past when the SIOCDIFADDR handler was doing sc-sc_naddrs-- but it is definitively dead code now. Ok to kill it? Index: netinet/ip_carp.c

Re: Use atomics for mutating p_sigmask

2014-07-08 Thread Martin Pieuchot
On 07/07/14(Mon) 13:46, Matthew Dempsky wrote: p_sigmask is only modified by the owning thread from process context (e.g., sys_sigprocmask(), sys_sigreturn(), userret(), or postsig()), but it can be accessed anywhere (e.g., interrupts or threads on other CPUs). Currently sys_sigprocmask()

kill unused shutdown hook pointers

2014-07-09 Thread Martin Pieuchot
ok? Index: dev/ata/wdvar.h === RCS file: /cvs/src/sys/dev/ata/wdvar.h,v retrieving revision 1.20 diff -u -p -r1.20 wdvar.h --- dev/ata/wdvar.h 11 Jun 2013 16:42:14 - 1.20 +++ dev/ata/wdvar.h 9 Jul 2014 10:52:35 -

Kill unused (cached) routes

2014-07-09 Thread Martin Pieuchot
While looking at route refcounting issues I found some unused fields... Ok to kill them? Index: net/if_gif.h === RCS file: /cvs/src/sys/net/if_gif.h,v retrieving revision 1.10 diff -u -p -r1.10 if_gif.h --- net/if_gif.h21

Kill old n_time, n_short types, netinet/in_systm.h

2014-07-13 Thread Martin Pieuchot
Here's an updated version of a diff I sent some months ago. It removes the dependency on netinet/in_systm.h for the network headers by substituting n_time, n_long and n_short by their equivalent u_int_* types. This will allows to stop including netinet/in_systm.h in all the files pulling

Don't use n_long in libsa stand/*

2014-07-13 Thread Martin Pieuchot
Stop using n_long and remove netinet/in_systm.h? ok? Index: lib/libsa/arp.c === RCS file: /cvs/src/sys/lib/libsa/arp.c,v retrieving revision 1.11 diff -u -p -r1.11 arp.c --- lib/libsa/arp.c 11 Aug 2003 06:23:09 - 1.11

route(8) -sa

2014-07-22 Thread Martin Pieuchot
Anybody is using the -sa modifier of route(8)? A sockaddr in hexa, really? What's your use case? Otherwise, ok to kill it? Index: keywords.h === RCS file: /home/ncvs/src/sbin/route/keywords.h,v retrieving revision 1.28 diff -u -p

Re: route(8) -sa

2014-07-22 Thread Martin Pieuchot
On 22/07/14(Tue) 12:00, Claudio Jeker wrote: On Tue, Jul 22, 2014 at 10:06:35AM +0100, Stuart Henderson wrote: On 2014/07/22 11:01, Martin Pieuchot wrote: Anybody is using the -sa modifier of route(8)? A sockaddr in hexa, really? What's your use case? That only seems useful

Remove a hack concerning RTF_LLINFO

2014-07-22 Thread Martin Pieuchot
When I added p2p_rtrequest() the RTF_LOCAL flag was not yet available, so I used RTF_LLINFO to say that a route should be used for local trafic. The diff below removes this hack and correctly check for RTF_LOCAL in all the custom *_rtrequest() functions able to change the ifp of a route. ok?

Always have routes for broadcast addresses

2014-07-22 Thread Martin Pieuchot
Here's the last piece of information I'd like to *always* have in the routing table in order to be able to replace the RB-tree. This diff adds the configured broadcast addresses to the routing table permanently. Actually these addresses are handled like lladdr and are removed when their timeout

resume vs wsmoused vs X vs pms

2014-07-23 Thread Martin Pieuchot
Diff below changes pms(4) to make sure only one thread can change the state, thus generating I/O, of the underlying device at the same time. It fixes a race easily reproducible when a machine having wsmoused(8) and X running is resumed. The problem is that the first program trying to activate

Re: kernel panic

2014-08-05 Thread Martin Pieuchot
On 04/08/14(Mon) 21:41, Roberto E. Vargas Caballero wrote: Hi, After updating to the snapshot of 31 July, I get a kernel panic while booting if I have connected my usb devices. If I connect my devices (I connect them through an usb port expander) after booting everything work perfectly. I

Convert ARP llinfo allocation to pool(9)

2014-08-11 Thread Martin Pieuchot
Some llinfo structures might be allocated in interrupt path when ifa_rtrequest() is called, diff below convert such allocation to pool(9), ok? Index: netinet/if_ether.c === RCS file: /home/ncvs/src/sys/netinet/if_ether.c,v retrieving

Re: Convert ARP llinfo allocation to pool(9)

2014-08-11 Thread Martin Pieuchot
On 11/08/14(Mon) 21:17, David Gwynne wrote: why does it need queue.h? Because I forgot to add this include when I converted some lookups, various functions in the file use TAILQ macros. But sadly a lot of MD headers include this file...

systat pool: show only active pools

2014-08-12 Thread Martin Pieuchot
I'm always distracted by the huge number of (inactive) pools filling my screen when I do systat pool. So the diff below change the behavior of this view to only show statistics of ``active'' pools by default, the current behavior can be restored by pressing 'A'. Anybody else find this useful?

arp(8) output and expire timer

2014-08-12 Thread Martin Pieuchot
I find arp(8) output really difficult to read, but more importantly it does not print the expire time of non permanent entries like ndp(8). So the diff below change arp(8)'s output to be more similar to ndp(8)'s one. Before: $ arp -a ? (10.0.5.1) at 00:72:17:ab:94:3e on vlan3 static ?

Kill MRT_{ADD,DEL}_BW_UPCALL

2014-08-13 Thread Martin Pieuchot
Our multicast routing code is insert your adjective and for the most part unused. We discussed with claudio@ during t2k13 to rewrite only the parts that people currently use, any volunteer? In the meantime, I'd like to kill the obviously unused parts of it. So here's a first diff that remove

Fix pppoe(4) with rdomain != 0

2014-08-13 Thread Martin Pieuchot
ok? Index: net/if_pppoe.c === RCS file: /home/ncvs/src/sys/net/if_pppoe.c,v retrieving revision 1.40 diff -u -p -r1.40 if_pppoe.c --- net/if_pppoe.c 12 Jul 2014 18:44:22 - 1.40 +++ net/if_pppoe.c 13 Aug 2014

Re: arp(8) output and expire timer

2014-08-18 Thread Martin Pieuchot
On 15/08/14(Fri) 10:43, Henning Brauer wrote: * Stuart Henderson st...@openbsd.org [2014-08-15 10:29]: On 2014/08/12 15:46, Martin Pieuchot wrote: I find arp(8) output really difficult to read, but more importantly it does not print the expire time of non permanent entries like ndp(8

Re: arp(8) output and expire timer

2014-08-20 Thread Martin Pieuchot
On 18/08/14(Mon) 11:55, Henning Brauer wrote: * Martin Pieuchot mpieuc...@nolizard.org [2014-08-18 11:03]: On 15/08/14(Fri) 10:43, Henning Brauer wrote: * Stuart Henderson st...@openbsd.org [2014-08-15 10:29]: On 2014/08/12 15:46, Martin Pieuchot wrote: I find arp(8) output really

Kill rtalloc()

2014-08-21 Thread Martin Pieuchot
As you might have seen, I started looking at routing entries pointing to stale ifa's. This is a necessary step if we want to rely on our routing entries to do address lookups. This audit leads me to believe that the actual check used to determine if a cached route entry is still valid might not

ehci(4) diff needs testing in order to integrate xhci(4)

2014-08-21 Thread Martin Pieuchot
So I've been sitting on this diff for quite some months now because I wanted to fix some other issues asking for some more tests. Various people already tested it, I need this in order to be able to properly integrate xhci(4) to our stack. The main goal of this diff is to remove the need to

Re: arp(8) output and expire timer

2014-08-22 Thread Martin Pieuchot
On 22/08/14(Fri) 22:54, Stuart Henderson wrote: can we go back to the standard MAC address formatting that's used everywhere except ndp? Fine with me, any reason not to do it for ndp too? Index: arp.c === RCS file:

Re: Kill rtalloc()

2014-09-01 Thread Martin Pieuchot
On 21/08/14(Thu) 15:36, Martin Pieuchot wrote: As you might have seen, I started looking at routing entries pointing to stale ifa's. This is a necessary step if we want to rely on our routing entries to do address lookups. This audit leads me to believe that the actual check used

arp(8) and ndp(8) tweaks

2014-09-02 Thread Martin Pieuchot
Diff below indicates by using a `l' flag which entries are local to the machine. It also skips broadcast entries from the arp -a output because even if they are implemented as llinfo entries, they'll never be resolved and can be safely ignored. Finally it change arp(8) to display 'permanent'

splnet() and SIOCSIFADDR

2014-09-03 Thread Martin Pieuchot
Drivers that need a splnet() protection inside their SIOCSIFADDR generally raise the spl level themselves, so we should not need to do that in in{6,}_ifinit(). One exception to this rule is, as always, carp(4)... So the diff below moves the spl dance inside carp's SIOCSIFADDR handler, it's a

Re: splnet() and SIOCSIFADDR

2014-09-03 Thread Martin Pieuchot
On 03/09/14(Wed) 15:25, Martin Pieuchot wrote: Drivers that need a splnet() protection inside their SIOCSIFADDR generally raise the spl level themselves, so we should not need to do that in in{6,}_ifinit(). One exception to this rule is, as always, carp(4)... So the diff below moves

Re: splnet() and SIOCSIFADDR

2014-09-11 Thread Martin Pieuchot
On 03/09/14(Wed) 20:59, Alexander Bluhm wrote: On Wed, Sep 03, 2014 at 03:53:34PM +0200, Martin Pieuchot wrote: @@ -1078,7 +1079,7 @@ in6_purgeaddr(struct ifaddr *ifa) void in6_unlink_ifa(struct in6_ifaddr *ia6, struct ifnet *ifp) { - int s = splnet(); + splsoftassert

Re: splnet() and SIOCSIFADDR

2014-09-11 Thread Martin Pieuchot
On 03/09/14(Wed) 23:59, Claudio Jeker wrote: On Wed, Sep 03, 2014 at 03:25:34PM +0200, Martin Pieuchot wrote: Drivers that need a splnet() protection inside their SIOCSIFADDR generally raise the spl level themselves, so we should not need to do that in in{6,}_ifinit(). One exception

Enable cpu_idle on G5

2014-09-19 Thread Martin Pieuchot
Now that we're no longer updating the hid0 register in the idle loop, we can enable idle for G5. ok? Index: macppc/cpu.c === RCS file: /cvs/src/sys/arch/macppc/macppc/cpu.c,v retrieving revision 1.76 diff -u -p -r1.76 cpu.c ---

Stop using the RB-tree of addresses

2014-09-23 Thread Martin Pieuchot
Now that the routing table contains all the information required to do address lookups, here's a diff to stop using it. This diff contains three independent chunks. - The first one reverts the internals of ifa_ifwithaddr() to iterate on the global list of interfaces (ifnet). I didn't

Re: call for testing: MSI for msk(4)

2014-09-23 Thread Martin Pieuchot
On 23/09/14(Tue) 13:58, Brad Smith wrote: On 31/12/13 12:06 AM, Brad Smith wrote: On 16/05/13 5:55 PM, Jérémie Courrèges-Anglas wrote: Hi, I've been using msk(4) with MSI on my laptop since a few days, with no apparent problem. mskc0 at pci2 dev 0 function 0 Marvell Yukon 88E8040 rev

Re: splnet() and SIOCSIFADDR

2014-09-30 Thread Martin Pieuchot
On 11/09/14(Thu) 10:49, Martin Pieuchot wrote: On 03/09/14(Wed) 20:59, Alexander Bluhm wrote: On Wed, Sep 03, 2014 at 03:53:34PM +0200, Martin Pieuchot wrote: @@ -1078,7 +1079,7 @@ in6_purgeaddr(struct ifaddr *ifa) void in6_unlink_ifa(struct in6_ifaddr *ia6, struct ifnet *ifp

Re: VPLS patch [1/3]: prepare sys/ to receive pseudowire implementation

2014-09-30 Thread Martin Pieuchot
Hello Rafael, On 14/09/14(Sun) 23:49, Rafael Zalamena wrote: The following patch is just a preparation for the code that is coming to implement the wire network interface (the VPLS datapath) to work on OpenBSD. This code turns the mpe code that handles route and labels into some general use

Re: 802.11 autoassoc

2014-09-30 Thread Martin Pieuchot
Hey Vadim, I'm happy to see you've put some efforts into improving how wireless networks are configured on OpenBSD. I have some questions below. On 26/09/14(Fri) 21:38, Vadim Zhukov wrote: This is a proof-of-concept patch that implements network profiles in kernel, using IEEE 802.11 network

Local routes and loopback or p2p interfaces

2014-10-02 Thread Martin Pieuchot
Most of the local routes added on a system contain the link-layer address of the interface they are attached too. It is like that because these routes must be compatible with the cloned routes for ARP or ND. But for loopback or point-to-point interfaces it is different since the 'gateway' of

USB stack change needed for xhci(4)

2014-10-02 Thread Martin Pieuchot
Our USB stack contains a hack needed for ehci(4) and ohci(4) that breaks xhci(4). The diff below moves this hack in these drivers, and makes it possible to have a working xhci(4) in GENERIC. I'd like this diff to be tested on as much machines as possible, because the code path it touches is

Re: mpe patch: use rt_ifa_{add,del}

2014-10-02 Thread Martin Pieuchot
On 01/10/14(Wed) 21:54, Rafael Zalamena wrote: This new diff aims to simplify the mpe(4) device and also to improve the old code that handled the installation of MPLS interface routes. I followed what mpi@ said: On Tue, Sep 30, 2014 at 11:00:25AM +0200, Martin Pieuchot wrote: Hello

Unnecessary lookup for every packet in ip_output()

2014-10-07 Thread Martin Pieuchot
Now that we can use the routing table to check if the destination of a packet is a broadcast address, we can replace the lookup done for every packet by the simple check below. Ok? Index: netinet/ip_output.c === RCS file:

Re: hack for carp in IPv6 source address selection

2014-10-07 Thread Martin Pieuchot
On 03/10/14(Fri) 14:46, Stefan Sperling wrote: The IPv6 source address selection algorithm breaks ties by performing a bitwise match of each candidate source address against the destination address. The longest matching source address wins, regardless of which interface the source address came

Re: mpe patch: use rt_ifa_{add,del}

2014-10-08 Thread Martin Pieuchot
On 07/10/14(Tue) 18:44, Rafael Zalamena wrote: On Sat, Oct 04, 2014 at 07:39:03PM -0300, Rafael Zalamena wrote: On Thu, Oct 02, 2014 at 02:36:12PM +0200, Martin Pieuchot wrote: On 01/10/14(Wed) 21:54, Rafael Zalamena wrote: --- old chat snip --- Code changed: * Replaced old

RTFREE - rtfree

2014-10-08 Thread Martin Pieuchot
Diff below kills the macro and use the fonction instead since they are equivalent. It also replaces some 0 - NULL where it applies. It does not include the manpage bits, I'll deal with that afterward. I'd appreciate reviews and oks. Index: net/if_gre.c

A system without interface?

2014-10-08 Thread Martin Pieuchot
I'm looking after the uses of the global list of interface. These ones are pointless, you always have at least one interface on your system. Ok? Index: netinet/raw_ip.c === RCS file: /home/ncvs/src/sys/netinet/raw_ip.c,v retrieving

Fix CPU_INFO_FOREACH on powperc

2014-10-09 Thread Martin Pieuchot
If the macro is used before the secondary CPUs are running, it won't do what you expect. This makes profiling usable on macppc's GENERIC.MP. Ok? Index: include/cpu.h === RCS file: /cvs/src/sys/arch/powerpc/include/cpu.h,v

Re: Add Logitech C310 to usbdevs

2014-10-09 Thread Martin Pieuchot
On 09/10/14(Thu) 22:58, Jonathan Armani wrote: Hi, Diff add my Logitech Webcam C310 to usbdevs. Bus 000 Device 003: ID 046d:081b Logitech, Inc. Webcam C310 What do you see in your dmesg when you don't have this entry in usbdevs? Is it understandable? I'm asking, because generally USB

Re: A system without interface?

2014-10-14 Thread Martin Pieuchot
On 08/10/14(Wed) 14:29, Martin Pieuchot wrote: I'm looking after the uses of the global list of interface. These ones are pointless, you always have at least one interface on your system. Ok? Anyone? Index: netinet/raw_ip.c

Make loopattach() panic [was Re: A system without interface?]

2014-10-14 Thread Martin Pieuchot
On 14/10/14(Tue) 14:18, Claudio Jeker wrote: On Tue, Oct 14, 2014 at 11:01:46AM +0200, Martin Pieuchot wrote: On 08/10/14(Wed) 14:29, Martin Pieuchot wrote: I'm looking after the uses of the global list of interface. These ones are pointless, you always have at least one interface

More than just rtalloc1() - rtalloc(9) + man

2014-10-15 Thread Martin Pieuchot
=== RCS file: share/man/man9/rtalloc.9 diff -N share/man/man9/rtalloc.9 --- /dev/null 1 Jan 1970 00:00:00 - +++ share/man/man9/rtalloc.915 Oct 2014 12:18:38 - @@ -0,0 +1,78 @@ +.\ $OpenBSD$ +.\ +.\ Copyright (c) 2014 Martin Pieuchot

Should we allow to configure twice the same IP?

2014-10-28 Thread Martin Pieuchot
There's nothing that prevent you to configure the same IPv4 address on different interfaces in the same routing domain. But does it make sense? Index: netinet/in.c === RCS file: /home/ncvs/src/sys/netinet/in.c,v retrieving revision

  1   2   3   4   5   6   7   8   9   10   >