snmpd: support for multiple routing tables...

2014-04-10 Thread Mike Belopuhov
...borrowed from the bgpd for the most part. Currently it's not doing anything (kroute_first/kroute_getaddr will always select the rtable 0) since it needs new MIBs and some more diffs from blambert@. OK? diff --git usr.sbin/snmpd/kroute.c usr.sbin/snmpd/kroute.c index e157b25..d1f8890 100644

arp: notify userland when arp entry is gone

2014-04-07 Thread Mike Belopuhov
Hi, I need this one bit for my snmpd diff as well. rtdeletemsg does rtrequest1 and rt_missmsg in one go with some magic requried for that to happen. OK? diff --git sys/netinet/if_ether.c sys/netinet/if_ether.c index af3f3cd..548192f 100644 --- sys/netinet/if_ether.c +++ sys/netinet/if_ether.c

snmpd: support for ipNetToMediaTable (ARP table exporting)

2014-04-07 Thread Mike Belopuhov
Hi, With some help from blambert@ and thorough testing by sthen@, I was able to get this working fairly well. There are some rough edges however, namely the rdomain kludge and the need for an RTM_DELETE notification, but apart from that it seems to be doing the right thing. The ARP part of the

Re: snmpd: support for ipNetToMediaTable (ARP table exporting)

2014-04-07 Thread Mike Belopuhov
On Mon, Apr 07, 2014 at 16:21 +0200, Bret Lambert wrote: On Mon, Apr 07, 2014 at 04:04:24PM +0200, Mike Belopuhov wrote: +struct kif_arp * +karp_find(struct sockaddr *sa, u_short ifindex) +{ + struct kif_node *kn; + struct kif_arp *ka = NULL, s; + + memcpy

Re: snmpd: support for ipNetToMediaTable (ARP table exporting)

2014-04-07 Thread Mike Belopuhov
a bit of an update, mainly style changes. one functional change: don't rely on rtm_rmx.rmx_expire to set the F_STATIC flag as rt_getmetrics is not called consistenly (only with RTM_GETs) and besides RTF_STATIC flag is already present for static ARP entries.

Re: Be explicit: don't use ifa_ifwithnet()!

2014-03-31 Thread Mike Belopuhov
On 27 March 2014 15:33, Martin Pieuchot mpieuc...@nolizard.org wrote: Since rti_info[RTAX_IFP], when it is present, contains the sockaddr_dl of a given interface, in the chunk below, ifa_ifwithnet() will return its corresponding link-layer address. But here we are interested in the ifp, not

nfs rename is not atomic

2014-03-26 Thread Mike Belopuhov
Hi, After a bunch of failures (ld.so can't find libc.so for the install(1)) with parallel make build (-j 4) on an NFS setup I came up with this simple testcase that shows that rename(2) on NFS is not atomic by trying to open(2) the file that is being renamed in a tight loop. I can reproduce this

Re: Kill ext_ifp

2014-03-26 Thread Mike Belopuhov
On 26 March 2014 16:35, Martin Pieuchot mpieuc...@nolizard.org wrote: Here's a preview of what will happen to struct pkthdr. Do not store a pointer since ifp might disappear. That will allow us to stop garbage collecting the various queues when an interface is destroy/detached and since the

Re: ipv4_input() and rcvif

2014-03-26 Thread Mike Belopuhov
On 26 March 2014 16:22, Martin Pieuchot mpieuc...@nolizard.org wrote: Simple diff below stop using the 'rcvif' pointer all over the ipv4_input() path in order to prepare is removal from pkthdr. There should be no functional change, ok? looks good to me. OK mikeb

Re: Stop abusing rcvif pointer to pass wireless nodes

2014-03-18 Thread Mike Belopuhov
On 18 March 2014 07:20, Claudio Jeker cje...@diehard.n-r-g.com wrote: On Mon, Mar 17, 2014 at 11:41:38AM -0600, Theo de Raadt wrote: What about using a more generic name which is not bound to 80211 since the field is a generic pointer. This may allow us to use something similar in other

arp resolution completion notifications

2014-03-17 Thread Mike Belopuhov
Hi, I would like to send results of ARP resolution back to the userland in order to be able to catch them via the AF_ROUTE socket. I'm cooking some SNMPd changes (ipNetToMediaPhysAddress support primarily) based on this. I have inspected bgpd's and ospfd's kroute.c files and believe they should

fixup arp(8) rdomain hang

2014-03-17 Thread Mike Belopuhov
Hi, It's been known for ages that arp -V 1 -d 10.0.0.1 would hang forever. Apparently the cause is simple: we pass the target rdomain in the rtm, but the AF_ROUTE socket that we create is always in rdomain 0 (c.f. getsocket in the arp source code). The hang happens in the read syscall at the

Re: RTAX_IFP, wait, what is that?

2014-03-10 Thread Mike Belopuhov
On Mon, Mar 10, 2014 at 17:51 +0100, Martin Pieuchot wrote: Diff below makes it clear that RTAX_IFP points to the interface's sockaddr_dl, which is always the first element of the per-ifp list of address. Just use the pointer present in struct ifnet instead of relying on the fact that the

Re: sysctl.8: add missing mtudisctimeout for ipv6

2014-03-03 Thread Mike Belopuhov
On 3 March 2014 20:09, Jason McIntyre j...@kerhand.co.uk wrote: net.inet6.ip6.neighborgcthresh net.inet6.ip6.maxifprefixes net.inet6.ip6.maxifdefrouters net.inet6.ip6.maxdynroutes net.inet6.ip6.dad_pending net.inet6.ip6.mtudisctimeout any

Re: Packet Filter nat-to issue

2014-02-28 Thread Mike Belopuhov
On 28 February 2014 10:15, Loïc Blot loic.b...@unix-experience.fr wrote: Hello, i encounter a strange problem today on PF. I don't know if this i normal but the result is illogic. I have this rule: pass out quick proto tcp from all_clients_v4 to port { smtp smtps 587 imap imaps pop3 pop3s

Re: Packet Filter nat-to issue

2014-02-28 Thread Mike Belopuhov
On 28 February 2014 12:19, Mike Belopuhov m...@belopuhov.com wrote: On 28 February 2014 12:14, Stuart Henderson st...@openbsd.org wrote: While I agree with this, I don't think we should ever be natting to a non-scoped link-local address.. i think i have addressed this (or a similar) problem

Re: Packet Filter nat-to issue

2014-02-28 Thread Mike Belopuhov
On 28 February 2014 12:24, Mike Belopuhov m...@belopuhov.com wrote: On 28 February 2014 12:19, Mike Belopuhov m...@belopuhov.com wrote: On 28 February 2014 12:14, Stuart Henderson st...@openbsd.org wrote: While I agree with this, I don't think we should ever be natting to a non-scoped link

Re: Packet Filter nat-to issue

2014-02-28 Thread Mike Belopuhov
On 28 February 2014 12:27, Stuart Henderson st...@openbsd.org wrote: On 2014/02/28 12:19, Mike Belopuhov wrote: On 28 February 2014 12:14, Stuart Henderson st...@openbsd.org wrote: While I agree with this, I don't think we should ever be natting to a non-scoped link-local address.. i

Re: em(4): Don't count RX overruns and missed packets as input errros

2014-02-12 Thread Mike Belopuhov
On 11 February 2014 20:05, Brad Smith b...@comstyle.com wrote: On Tue, Feb 11, 2014 at 07:43:51PM +0100, Mark Kettenis wrote: Date: Tue, 11 Feb 2014 13:30:47 -0500 From: Brad Smith b...@comstyle.com Index: arch/socppc/dev/if_tsec.c

Re: report icmp error drops because of rate limiting

2014-01-19 Thread Mike Belopuhov
On 19 January 2014 12:03, Claudio Jeker cje...@diehard.n-r-g.com wrote: As done in IPv6 land report how many packets are dropped because we hit the rate limiter (net.inet.icmp.errppslimit). On bigger routers it may be needed to tune that value up in case to many packets are dropped. OK? --

Re: Get random data very early

2014-01-19 Thread Mike Belopuhov
On 20 January 2014 02:05, Theo de Raadt dera...@cvs.openbsd.org wrote: This change allows the arc4random() subsystem to self-initialize from boot-supplied data, upon first call. It uses rs_buf[] to build the chacha context, then permits drawing of up to 1GB of data without entering the

Re: remove max_datalen since it is used only once

2014-01-18 Thread Mike Belopuhov
On 19 January 2014 12:39, Claudio Jeker cje...@diehard.n-r-g.com wrote: Subject sais it all. One less gloabl symbol. -- :wq Claudio OK

Re: rc default PF ruleset too restrictive for DHCPv6

2014-01-18 Thread Mike Belopuhov
On 19 January 2014 15:57, Brad Smith b...@comstyle.com wrote: On Thu, Jan 09, 2014 at 03:55:44PM -0500, Brad Smith wrote: The default PF ruleset as setup by rc is too restrictive. Have the default ruleset allow for DHCPv6. Anyone? yes, i think this is ok.

Re: Stop the madness in radix.c

2014-01-18 Thread Mike Belopuhov
On 19 January 2014 16:35, Claudio Jeker cje...@diehard.n-r-g.com wrote: We no longer use radix.c in userland since routed(8) was killed aeons ago. There is no need for this madness anymore so remove it. OK

Re: Stop the madness in radix.c take 2

2014-01-18 Thread Mike Belopuhov
On Sun, Jan 19, 2014 at 05:42 +0100, Claudio Jeker wrote: Here is more cleanup. Kill the MKget MKfree madness and replace it with *drummrolls* a pool(9). Makes the code a lot easier to digest. -- :wq Claudio Index: net/radix.c

Re: Stop the madness in radix.c take 2

2014-01-18 Thread Mike Belopuhov
On Sun, Jan 19, 2014 at 06:37 +0100, Claudio Jeker wrote: On Sun, Jan 19, 2014 at 06:15:06AM +0100, Mike Belopuhov wrote: On Sun, Jan 19, 2014 at 05:42 +0100, Claudio Jeker wrote: Here is more cleanup. Kill the MKget MKfree madness and replace it with *drummrolls* a pool(9). Makes

Re: unlink pf divert state when pcb detaches

2014-01-15 Thread Mike Belopuhov
On 12 January 2014 14:01, Alexander Bluhm alexander.bl...@gmx.net wrote: Hi, There is an awkward behaviour after we have diverted connections to a socket. When the application removes the socket, the pf state will persist. A new connection will not hit the divert rule as the state grabs

Re: sppp: remove no-op HIDE macro

2014-01-10 Thread Mike Belopuhov
On 10 January 2014 15:35, Stefan Sperling s...@openbsd.org wrote: HIDE probably exists to allow switching to static functions. We don't usually have static functions in the kernel so I don't see the point in keeping this. It just clutters the code. go for it.

Re: rti_info and defines

2014-01-08 Thread Mike Belopuhov
On 8 January 2014 12:02, Martin Pieuchot mpieuc...@nolizard.org wrote: I find it really difficult to understand and work with the code of rtsock.c because of the following defines: /* Sleazy use of local variables throughout file, warning */ #define dst

Re: Use per-interface list in IFP_TO_IA()

2014-01-07 Thread Mike Belopuhov
On 7 January 2014 11:31, Martin Pieuchot mpieuc...@nolizard.org wrote: Now that joining an IPv4 multicast group does not require a pre-configured address, we can safely convert this macro to iterate over the local list of addresses. I already got oks from bluhm@ and henning@ in the past, but

Re: em(4): Don't count RX overruns and missed packets as input errros

2013-12-31 Thread Mike Belopuhov
On 31 December 2013 09:46, Brad Smith b...@comstyle.com wrote: On 31/12/13 3:14 AM, Mark Kettenis wrote: Date: Tue, 31 Dec 2013 01:28:04 -0500 From: Brad Smith b...@comstyle.com Don't count RX overruns and missed packets as inputs errors. They're expected to increment when using MCLGETI.

Re: cmp fd leak fix

2013-12-30 Thread Mike Belopuhov
On Sun, Dec 29, 2013 at 23:28 -0800, Loganaden Velvindron wrote: Hi All, From NetBSD: Plug fd leak. Coverity CID 1624. fd leak? they're leaking back to the system. the function is not recursive nor it's called in a loop. Index: src/usr.bin/cmp/special.c

Re: column memory leak fix

2013-12-30 Thread Mike Belopuhov
On Sun, Dec 29, 2013 at 22:45 -0800, Loganaden Velvindron wrote: Hi All, From NetBSD: Plug memory leak. Coverity CID 1596 memory leak? can you please elaborate where else this memory is leaking if not back to the system. Index: src/usr.bin/column/column.c

Re: column memory leak fix

2013-12-30 Thread Mike Belopuhov
On Mon, Dec 30, 2013 at 03:59 -0800, Loganaden Velvindron wrote: On Mon, Dec 30, 2013 at 12:45:47PM +0100, Mike Belopuhov wrote: On Sun, Dec 29, 2013 at 22:45 -0800, Loganaden Velvindron wrote: Hi All, From NetBSD: Plug memory leak. Coverity CID 1596 memory leak? can

Re: column memory leak fix

2013-12-30 Thread Mike Belopuhov
On 30 December 2013 16:35, Loganaden Velvindron lo...@elandsys.com wrote: On Mon, Dec 30, 2013 at 08:42:00AM -0500, Ted Unangst wrote: On Mon, Dec 30, 2013 at 13:53, Mike Belopuhov wrote: On Mon, Dec 30, 2013 at 03:59 -0800, Loganaden Velvindron wrote: On Mon, Dec 30, 2013 at 12:45:47PM

Re: in6_ifdetach() doesn't remove ff01::1 route

2013-12-17 Thread Mike Belopuhov
On 17 December 2013 15:38, Stefan Sperling s...@openbsd.org wrote: Interface-specific routes created in in6_update_ifa() should be removed when the interface detaches from IPv6. However, in6_ifdetach() forgets to remove the ff01::1 route. It only deletes the f02::1 route. makes sense to me.

Re: add new device to cdce.4

2013-12-11 Thread Mike Belopuhov
On 11 December 2013 10:14, Kirill Bychkov ki...@linklevel.net wrote: Hi! This Yota dongle works fine. I think adding this into manual would be useful for russian OpenBSD users. umass1 at uhub0 port 1 configuration 1 interface 0 GCT SEMICONDUCTOR Inc Modem Yota rev 2.00/1.00 addr 4 umass1:

Re: txp(4) 3Com 3XP Typhoon/Sidewinder diff needs testing

2013-12-02 Thread Mike Belopuhov
On 2 December 2013 03:07, Brad Smith b...@comstyle.com wrote: Here is a diff for the txp(4) 3Com 3XP Typhoon/Sidewinder driver to clean up and update the receive filter / ioctl handling code to be in line with the other drivers. Anyone with hw and able to test? OK? as long as you're just

Re: rdomain - rtableid confusion

2013-11-26 Thread Mike Belopuhov
On 26 November 2013 12:38, Martin Pieuchot mpieuc...@nolizard.org wrote: These two functions take a rtableid not a rdomain as an argument, simple renaming to avoid confusion. ok? makes sense to me. OK mikeb

Re: No need for INADDR_TO_IFP(), less global IPv4 list usage

2013-11-26 Thread Mike Belopuhov
On 26 November 2013 12:44, Martin Pieuchot mpieuc...@nolizard.org wrote: Diff below replaces the INADDR_TO_IFP() macro that iterates over the global list of IPv4 by a call to in_iawithaddr() that uses the global tree of addresses. Since these two structures are now always coherent it is safe

Re: Don't link multicast records to the first address

2013-11-26 Thread Mike Belopuhov
On 22 November 2013 09:26, Martin Pieuchot mpieuc...@nolizard.org wrote: On 18/11/13(Mon) 11:43, Martin Pieuchot wrote: Diff below changes the way protocol multicast addresses are linked to an interface. Right now they are added to a list attached to the first protocol address of an

Re: hiding struct ifnet diff #4v1: if_var.h

2013-11-21 Thread Mike Belopuhov
On Mon, Nov 18, 2013 at 19:07 +0100, Mike Belopuhov wrote: This diff splits kernel visible parts away from if.h into a separate header if_var.h. As a compatibility goo for the kernel if.h will also include if_var.h under _KERNEL. The benefit of going this way is that we don't need to define

Re: pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Mike Belopuhov
could you please add more description to this report since it's very hard to follow and interpret your mail. On 20 November 2013 12:11, Alexey Suslikov alexey.susli...@gmail.com wrote: Hi. This is on 5.4-stable. Trivial master/slave carp(4) setup. vlan(4) is to make picture clear wrt prio.

Re: pfsync(4) mangles prio in master/slave setup

2013-11-20 Thread Mike Belopuhov
On 20 November 2013 13:10, Alexey Suslikov alexey.susli...@gmail.com wrote: On Wed, Nov 20, 2013 at 1:38 PM, Alexey Suslikov alexey.susli...@gmail.com wrote: On Wed, Nov 20, 2013 at 1:32 PM, Mike Belopuhov m...@belopuhov.com wrote: could you please add more description to this report since

Re: FDDI/ATM leftovers

2013-11-18 Thread Mike Belopuhov
On 18 November 2013 11:24, Martin Pieuchot mpieuc...@nolizard.org wrote: Since we don't support any FDDI or ATM interfaces anymore, remove some special cases for such interface types in our kernel. ok? OK. looks like there's more stuff that can die in the fire...

hiding struct ifnet diff #1: queue.h

2013-11-18 Thread Mike Belopuhov
This guys rely on the fact that if.h includes queue.h, but they shouldn't really since lists are needed by the struct ifnet only. OK? diff --git sbin/dhclient/dhcpd.h sbin/dhclient/dhcpd.h index 53625fb..c03af36 100644 --- sbin/dhclient/dhcpd.h +++ sbin/dhclient/dhcpd.h @@ -43,10 +43,11 @@

struct ifnet diff #2: ifnet in other structures

2013-11-18 Thread Mike Belopuhov
This diff hides a bunch of structures (namely arpcom, llinfo_arp, ethernet multicast macros along the way, and in_ifaddr the same way in6_ifaddr is hidden). OK? diff --git sys/netinet/if_ether.h sys/netinet/if_ether.h index 9ef9c12..459c3fa 100644 --- sys/netinet/if_ether.h +++

hiding struct ifnet diff #3: pfvar.h

2013-11-18 Thread Mike Belopuhov
pfctl shares some structures (namely pfi_kif) with the kernel but doesn't use the ifnet pointer so it gets a bunch of forward declarations for ifnet and interface group structures. OK? diff --git sys/net/pfvar.h sys/net/pfvar.h index 37f61e4..a05fc49 100644 --- sys/net/pfvar.h +++

hiding struct ifnet diff #4v1: if_var.h

2013-11-18 Thread Mike Belopuhov
This diff splits kernel visible parts away from if.h into a separate header if_var.h. As a compatibility goo for the kernel if.h will also include if_var.h under _KERNEL. The benefit of going this way is that we don't need to define _KERNEL in the netstat friends (a tradeoff is that they will

hiding struct ifnet diff #4v2: _KERNEL

2013-11-18 Thread Mike Belopuhov
As promised here's a take on hiding ifnet via _KERNEL. This looks a bit simpler. I've tried not to toss things around that much and have only moved 'ifqueue'. diff --git sys/net/if.h sys/net/if.h index b7d1b3c..9a14117 100644 --- sys/net/if.h +++ sys/net/if.h @@ -58,16 +58,15 @@ void

Re: IPv6 routing header type 0

2013-11-15 Thread Mike Belopuhov
On 15 November 2013 15:08, Alexander Bluhm alexander.bl...@gmx.net wrote: On Thu, Nov 14, 2013 at 05:38:14PM -0700, Theo de Raadt wrote: Beautiful. I seems there was enough discussion. The Security argument is more important than the others. The new diff has no performance impact when pf

Re: convert sppp(4) to taskq

2013-11-15 Thread Mike Belopuhov
On 15 November 2013 15:13, Stefan Sperling s...@openbsd.org wrote: Is this done right? Works here with pppoe(4) for both IPv4 and IPv6. i think this diff might lack task_del's in the detach code. have you tried destroying your pppoe interface?

Re: convert sppp(4) to taskq

2013-11-15 Thread Mike Belopuhov
On 15 November 2013 15:45, Stefan Sperling s...@openbsd.org wrote: On Fri, Nov 15, 2013 at 03:20:48PM +0100, Mike Belopuhov wrote: On 15 November 2013 15:13, Stefan Sperling s...@openbsd.org wrote: Is this done right? Works here with pppoe(4) for both IPv4 and IPv6. i think this diff

Re: IPv6 routing header type 0

2013-11-14 Thread Mike Belopuhov
On 14 November 2013 18:52, Henning Brauer lists-openbsdt...@bsws.de wrote: * Theo de Raadt dera...@cvs.openbsd.org [2013-11-14 18:47]: it is the status quo *right now* Look, you can't call something the status quo when a commit was made 1 month ago, to a REAL status quo that existed for 10

convert crypto queue to the task(9) api

2013-10-30 Thread Mike Belopuhov
Tested on amd64 SP and MP, i386 SP so far. sparc64 MP test is in progress. I've also tested the crypto(4) interface (doesn't use queue) so softraid should work as well. ok? diff --git sys/crypto/crypto.c sys/crypto/crypto.c index 7df0c435..fbdcd97 100644 --- sys/crypto/crypto.c +++

Re: convert crypto queue to the task(9) api

2013-10-30 Thread Mike Belopuhov
On Wed, Oct 30, 2013 at 14:58 +0100, Mike Belopuhov wrote: Tested on amd64 SP and MP, i386 SP so far. sparc64 MP test is in progress. I've also tested the crypto(4) interface (doesn't use queue) so softraid should work as well. sparc64 test is done. on a side note, that IPL_HIGH can

Re: Make bioctl(4) print cache policy

2013-10-22 Thread Mike Belopuhov
On 22 October 2013 15:22, Mark Kettenis mark.kette...@xs4all.nl wrote: Diff below makes bioctl(4) print the cache policy for that's currently in effect for RAID volumes. It only prints the state (WB for write-back, WT for write-through) if the RAID controller driver fills in the details in

defer routing table updates on link state changes (again)

2013-10-19 Thread Mike Belopuhov
hi, since mpi's if_index diff is now in, this should probably go in as well. it has received some testing in the meantime. original description: in order to make our life a bit easier and prevent rogue accesses to the routing table from the hardware interrupt context violating all kinds of spl

Re: pf dropping window updates and acks

2013-10-11 Thread Mike Belopuhov
On Fri, Oct 11, 2013 at 12:09 +0200, Gerhard Roth wrote: In January bluhm@ introduced 'data_end' to pf.c:tcp_track_full(). Now this breaks the handling of non-data packets. They may be rejected because the SEQ_GEQ(src-seqhi, data_end) check fails. The patch below should fix this. Makes

Re: 5.4 html Security Improvements section

2013-10-09 Thread Mike Belopuhov
On 9 October 2013 19:51, Alexey E. Suslikov alexey.susli...@gmail.com wrote: * Added AES-XTS support to aesni crypto(4) driver on amd64. Allows softraid(4) to benefit from the AES-NI instructions on newer Intel CPUs not at the moment, though.

Re: enc interface errno

2013-09-27 Thread Mike Belopuhov
On 27 September 2013 15:24, Alexander Bluhm alexander.bl...@gmx.net wrote: Hi, The error return codes for the enc interface seem quite inconsistent. Always return the appropriate errno. ok? bluhm OK

Re: defer routing table updates on link state changes

2013-09-12 Thread Mike Belopuhov
On 12 September 2013 17:18, Martin Pieuchot mpieuc...@nolizard.org wrote: FWIW it would be interesting to modify tun(4) so that it doesn't need to detach/reattach itself when switching between mode, this would allow us to stop reusing the last index. this definitely makes a lot of sense.

Re: defer routing table updates on link state changes

2013-09-12 Thread Mike Belopuhov
On 12 September 2013 17:31, Reyk Floeter r...@openbsd.org wrote: On Thu, Sep 12, 2013 at 05:18:39PM +0200, Martin Pieuchot wrote: For example, you have to query the IfIndex via SNMP to get further information, like the ifName or statistics, and most monitoring systems would save interface

Re: defer routing table updates on link state changes

2013-09-12 Thread Mike Belopuhov
On 12 September 2013 18:28, Mike Belopuhov m...@belopuhov.com wrote: On 12 September 2013 18:14, Reyk Floeter r...@openbsd.org wrote: On Thu, Sep 12, 2013 at 05:53:42PM +0200, Mike Belopuhov wrote: looks like you misunderstand the problem we're dealing with here. Sure, I do. You're trying

Re: defer routing table updates on link state changes

2013-09-12 Thread Mike Belopuhov
On 12 September 2013 18:14, Reyk Floeter r...@openbsd.org wrote: On Thu, Sep 12, 2013 at 05:53:42PM +0200, Mike Belopuhov wrote: looks like you misunderstand the problem we're dealing with here. Sure, I do. You're trying to push one thing and you don't want to hear the concerns about

Re: defer routing table updates on link state changes

2013-09-12 Thread Mike Belopuhov
On 12 September 2013 19:07, Reyk Floeter r...@openbsd.org wrote: On Thu, Sep 12, 2013 at 06:59:13PM +0200, Mike Belopuhov wrote: Ok, let's stop this. I don't think you read what I replied before. I didn't say that we're static with if_indexes, just that we shouldn't make it worse

Re: defer routing table updates on link state changes

2013-09-12 Thread Mike Belopuhov
On 12 September 2013 18:48, Reyk Floeter r...@openbsd.org wrote: On Thu, Sep 12, 2013 at 06:28:15PM +0200, Mike Belopuhov wrote: Sure, I do. You're trying to push one thing and you don't want to hear the concerns about a specific detail of it. with all respect, i think you don't

Re: ix(4): enable checksum offload

2013-09-09 Thread Mike Belopuhov
On 9 September 2013 21:48, Brad Smith b...@comstyle.com wrote: Here is a diff to enable the checksum offload support for ix(4). Looking for any testing. last time i checked this broke ospf traffic. please make sure at least ip/tcp, ip/udp, ip/icmp, ip/ip, ip/gre, ip/esp, ip/ah and ip/ospf

Re: em(4): enable checksum offload

2013-09-09 Thread Mike Belopuhov
On 9 September 2013 21:44, Brad Smith b...@comstyle.com wrote: Since I have been asked to send out these diffs again here is a diff to enable the checksum offload support for em(4). Looking for any testing. tx checksum offloading will not work on 75, 76, 80, i350.

Re: unknown products found in Dell Optiplex 9020

2013-09-09 Thread Mike Belopuhov
On 9 September 2013 22:46, STeve Andre' and...@msu.edu wrote: On 09/09/13 07:45, Paul de Weerd wrote: Found a couple of unknown Intel products in a Dell Optiplex 9020: vendor Intel, unknown product 0x153a (class network subclass ethernet, rev 0x04) at pci0 dev 25 function 0 not configured

Re: defer routing table updates on link state changes

2013-09-02 Thread Mike Belopuhov
On Mon, Aug 26, 2013 at 13:36 +0200, Mike Belopuhov wrote: hi, in order to make our life a bit easier and prevent rogue accesses to the routing table from the hardware interrupt context violating all kinds of spl assumptions we would like if_link_state_change that is called by network

Re: defer routing table updates on link state changes

2013-08-27 Thread Mike Belopuhov
On 27 August 2013 13:39, Martin Pieuchot mpieuc...@nolizard.org wrote: I think that's the right approach but the current code generating interfaces indexes is too clever from my point of view, it tries to reuse the last index if possible. This could lead to some funny races if we detach and

Re: Remove unused argument from *rtrequest()

2013-08-27 Thread Mike Belopuhov
On 27 August 2013 15:58, Martin Pieuchot mpieuc...@nolizard.org wrote: In order to define a proper API for our routine table, I'd like to turn the struct rt_addrinfo into a private type (ie: only used in route.c and rtsock.c). This type is used by a lost of code in our network stack to add or

defer routing table updates on link state changes

2013-08-26 Thread Mike Belopuhov
hi, in order to make our life a bit easier and prevent rogue accesses to the routing table from the hardware interrupt context violating all kinds of spl assumptions we would like if_link_state_change that is called by network device drivers in their interrupt service routines to defer its work

bge: call if_link_state_change when state is actually different

2013-08-23 Thread Mike Belopuhov
hi, bge(4) is the last driver in the tree that is willing to call if_link_state_change whenever, while others do so only when the link state does change. there should be no real change in functionality. ok? diff --git sys/dev/pci/if_bge.c sys/dev/pci/if_bge.c index 5cd56e2..233ccab 100644 ---

Re: Stop using static variables in ICMP

2013-08-19 Thread Mike Belopuhov
On 9 August 2013 11:04, Martin Pieuchot mpieuc...@nolizard.org wrote: This is the last episode from the first season of the serie, move your variables to the stack. Like in the previous episodes, this one will let us execute the various icmp functions in parallel without risk of trashing a

Re: src/sbin/ifconfig: missing include

2013-08-19 Thread Mike Belopuhov
On 19 August 2013 12:52, David Coppa dco...@gmail.com wrote: This misses util.h: cc -O2 -pipe -fno-pie -Wall -DINET6 -c /usr/src/sbin/ifconfig/ifconfig.c /usr/src/sbin/ifconfig/ifconfig.c: In function 'setifwpakey': /usr/src/sbin/ifconfig/ifconfig.c:1759: warning: implicit declaration of

Re: threaded prof signals

2013-08-16 Thread Mike Belopuhov
On 16 August 2013 09:23, Ted Unangst t...@tedunangst.com wrote: Actually, here's my concern. There's only one timeout for the process. What happens when two threads are running on two CPUs? Is there a guarantee that cpu0 will both set and execute the timeout before cpu1 sets it, or is there a

Re: rtsold ioctl sysctl

2013-08-15 Thread Mike Belopuhov
On Thu, Aug 15, 2013 at 00:39 +0200, Alexander Bluhm wrote: Hi, I would like to replace the obsolete ioctl(SIOCGDRLST_IN6) interface with sysctl(net.inet6.icmp6.nd6_drlist) in rtsold. Code copied from ndp. ok? looks good to me. OK

Re: remove obsolete nd6 ioctls

2013-08-15 Thread Mike Belopuhov
On 15 August 2013 17:34, Alexander Bluhm alexander.bl...@gmx.net wrote: Hi, After converting the last user of ioctl(SIOCGDRLST_IN6) to sysctl, I would like to remove dead kernel ioctl code. Is it save to just delete this? ok? bluhm if ports are fine with it, i'm fine as well (:

ray(4) removal

2013-08-13 Thread Mike Belopuhov
to make mpi's life a tad easier and also lose some weight, i'd like to move rat(4) to the attic. mpi, kettenis, jsg and henning agree. i'll commit the diff if noone objects. henning has also suggested to remove the pre-wifi era cnw(4). if there's interest i can cook a diff for that as well, but

Re: tedu netatm

2013-08-09 Thread Mike Belopuhov
On 9 August 2013 09:36, Martin Pieuchot mpieuc...@nolizard.org wrote: It's me again :) With a freshly updated and tested diff to tedu netatm. I got no objection since I raised the issue 5 months ago [0], so I'm now looking for oks. [0] http://marc.info/?l=openbsd-techm=136335787207091w=2 i

Re: Constify the null sockaddr in arp_rtrequest()

2013-08-08 Thread Mike Belopuhov
On 8 August 2013 12:35, Martin Pieuchot mpieuc...@nolizard.org wrote: arp_rtrequest() uses a default static sockaddr_dl which is only used read-only: it is copied by rt_setgate(). I'd like to constify this structure to make it clear no value can be trashed if code using it is run in parallel.

Re: Insert new IPv4 addresses at only one place

2013-08-07 Thread Mike Belopuhov
On 7 August 2013 15:07, Martin Pieuchot mpieuc...@nolizard.org wrote: Diff below deduplicate and move the code adding a new address to the global list into in_ifinit(), there's no functional change. While here add a comment about why we always delete addresses from the tree during update.

Re: include netinet/in_var.h in dev

2013-08-06 Thread Mike Belopuhov
On 6 August 2013 03:54, Alexander Bluhm alexander.bl...@gmx.net wrote: Hi, For an upcoming change in in6_var.h I would like to minimize the impact. Most network drivers include netinet/in_var.h, but apparently they don't have to. Can we remove these includes? compiled on amd64 and i386

Stop calling IPsec and pf under splnet

2013-07-12 Thread Mike Belopuhov
Hi, As it was pointed out by dhill there are some rogue splnets in the tcp_input that shouldn't be there really. The only reason they're still there is to match overzealous splnets in bridge_ broadcast. bridge_ifenqueue is the only function call in there that requires splnet protection since

ix(4) driver update to latest FreeBSD/Intel source code

2013-07-12 Thread Mike Belopuhov
Hi, The following diff updates most of the ix(4) driver to what FreeBSD and Intel have today. Most importantly it introduces support for the Ethernet flow control. Please test and report. OK's are welcome as well. http://theapt.org/~mike/ix.diff http://theapt.org/~mike/ix-w.diff (less

Re: divert-to with sockets bound to any

2013-06-19 Thread Mike Belopuhov
On 19 June 2013 20:20, Reyk Floeter r...@openbsd.org wrote: On Wed, Jun 19, 2013 at 08:00:01PM +0200, Reyk Floeter wrote: OK? I forgot the in6_pcblookup_listen() case, updated diff below. Reyk it boils down to the pcb lookup magic as i thought; ok mikeb.

Re: bge diff needs testing

2013-06-17 Thread Mike Belopuhov
I've got test report for the BCM5723/BCM5784. It would be great if someone with a 5703 or 5704 could try this. On Thu, Jun 13, 2013 at 18:09 +0200, Mike Belopuhov wrote: Hi, David Imhoff has found that flow control got broken in bge after some recent changes but also that simple ifconfig

bge diff needs testing

2013-06-13 Thread Mike Belopuhov
Hi, David Imhoff has found that flow control got broken in bge after some recent changes but also that simple ifconfig bge0 call done by any user can change current flow control settings. We've tested it on a bunch of recent cards (5719, 5720), one old-ish card (5715) but would like others to

bge: fixup the random tx backoff seed mask

2013-06-12 Thread Mike Belopuhov
NetBSD and Broadcom docs (5718-PG106-R.pdf and 57XX-PG105-R.pdf) and even our bnx(4) driver (and it's spec) agree that the mask should be 0x3ff. OK? diff --git sys/dev/pci/if_bgereg.h sys/dev/pci/if_bgereg.h index 3685f14..c0a28b9 100644 --- sys/dev/pci/if_bgereg.h +++ sys/dev/pci/if_bgereg.h @@

brgphy diff to test on fiber bge(4)

2013-06-10 Thread Mike Belopuhov
Hi, Could someone with a fiber bge give the diff below a spin. The code chunk in question should not be run for fiber PHYs. There's no change in functionality for non-optical transmitters. http://svnweb.freebsd.org/base/head/sys/dev/mii/brgphy.c?r1=244480r2=244481 OK's are welcome as well.

Re: ipsec / PF received-on

2013-06-04 Thread Mike Belopuhov
On 4 June 2013 02:48, Stuart Henderson st...@openbsd.org wrote: On 2013/06/04 02:01, Mike Belopuhov wrote: On 4 June 2013 00:49, Stuart Henderson s...@spacehopper.org wrote: On a router running PF and isakmpd, I have a rule like this: match out on pppoe0 inet all received-on vlan5 nat

Re: bge: don't use autopoll on anything above BCM5705

2013-05-29 Thread Mike Belopuhov
On 29 May 2013 09:35, David Gwynne d...@openbsd.org wrote: ive tested this on: bge0 at pci4 dev 0 function 0 Broadcom BCM5721 rev 0x21, BCM5750 C1 (0x4201): apic 0 int 16, address 00:18:f3:d1:80:64 brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0 bge1 at pci5 dev 0 function 0

bge: don't use autopoll on anything above BCM5705

2013-05-27 Thread Mike Belopuhov
Hi, While trying to fix the link state bug on BCM5719, David Imhoff has arrived at conclusion that the chip won't generate proper link state interrupts which renders auto-polling mode useless. As it turns out neither Linux nor FreeBSD use auto-polling mode for anything newer than BCM5705 and

Re: brgphy: reset autonegotiation timer when we get the link

2013-05-22 Thread Mike Belopuhov
On Tue, May 21, 2013 at 17:16 +0200, Mike Belopuhov wrote: from freebsd. ok? ping! diff --git sys/dev/mii/brgphy.c sys/dev/mii/brgphy.c index 7f0bae2..461c798 100644 --- sys/dev/mii/brgphy.c +++ sys/dev/mii/brgphy.c @@ -412,8 +412,10 @@ setit: * the BMSR twice in case

Re: brgphy: reset autonegotiation timer when we get the link

2013-05-22 Thread Mike Belopuhov
On Wed, May 22, 2013 at 18:08 +0200, Mark Kettenis wrote: Date: Wed, 22 May 2013 17:59:19 +0200 From: Mike Belopuhov m...@belopuhov.com On Tue, May 21, 2013 at 17:16 +0200, Mike Belopuhov wrote: from freebsd. ok? ping! There are more drivers in the tree that do the same

Re: iked(8) and GCM

2013-05-22 Thread Mike Belopuhov
On 22 May 2013 19:57, Aaron Stellman z...@x96.org wrote: On Mon, May 20, 2013 at 08:24:06PM +0100, Stuart Henderson wrote: If you make it a couple of paragraphs past the table, there is this paragraph, which is rather clear: Using AES-GMAC or NULL with ESP will only provide

Re: bge: use BUS_DMA_NOWIAT in functions called from the timeout

2013-05-21 Thread Mike Belopuhov
On 21 May 2013 17:18, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Tue, 21 May 2013 17:10:57 +0200 From: Mike Belopuhov m...@belopuhov.com prevent the system from spitting loads of splasserts when bge_watchdog fires. ok? I'd say no. Why is the driver tearing down and reinitializing

Re: adduser default blowfish rounds

2013-05-14 Thread Mike Belopuhov
On Mon, May 13, 2013 at 17:30 -0400, Ted Unangst wrote: On Mon, May 13, 2013 at 20:44, Stuart Henderson wrote: On 2013/05/13 19:32, Mark Lumsden wrote: I agree. tedu suggest 9 for the number of user rounds and 11 for root back in 2010. Are these numbers reasonable on most archs? Note

<    2   3   4   5   6   7   8   9   10   >