Re: clonable bpf

2012-11-27 Thread Mike Belopuhov
On Tue, Nov 27, 2012 at 22:17 +0100, Mike Belopuhov wrote: > apparently it works just fine. the number of clones is limited > by the v_specbitmap which currently allows for 64 clones total > (per system, not per process). > > apply the diff and see how all your apps are happi

clonable bpf

2012-11-27 Thread Mike Belopuhov
apparently it works just fine. the number of clones is limited by the v_specbitmap which currently allows for 64 clones total (per system, not per process). apply the diff and see how all your apps are happily using single device node: /dev/bpf0. thanks to pedro and thib for the spec_open_clone

Re: raw_usrreq - spl diff

2012-11-27 Thread Mike Belopuhov
As you might have already noticed, the diff was committed. Thanks! On Mon, Nov 26, 2012 at 8:34 PM, David Hill wrote: > Any thoughts? > > On Tue, Nov 13, 2012 at 02:18:35PM -0500, David Hill wrote: >>Hello - >> >>I originally asked mikeb if splnet was needed in net/pfkey.c. He added >>onto my di

Re: raw_usrreq - spl diff

2012-11-26 Thread Mike Belopuhov
On Mon, Nov 26, 2012 at 8:54 PM, Mark Kettenis wrote: >> Date: Mon, 26 Nov 2012 20:37:22 +0100 >> From: Mike Belopuhov >> >> We've discussed this with claudio and while there are might >> be some other related issues with pr_usrreq and spls, I think >> t

Re: raw_usrreq - spl diff

2012-11-26 Thread Mike Belopuhov
We've discussed this with claudio and while there are might be some other related issues with pr_usrreq and spls, I think this particular diff needs to be committed. OK? On Tue, Nov 13, 2012 at 14:18 -0500, David Hill wrote: > Hello - > > I originally asked mikeb if splnet was needed in net/pfke

Re: set ifp->if_baudrate with IF_Gbps() / IF_Mbps()

2012-11-25 Thread Mike Belopuhov
On Sun, Nov 25, 2012 at 10:53 AM, Reyk Floeter wrote: > Am Sonntag, 25. November 2012 schrieb Brad Smith : >> >> I don't think you're understanding what I am trying to say. I am not >> switching >> or removing anything per se. The MII framework already takes care of this >> and >> has for 12 years

Re: Display hardmtu with ifconfig hwfeatures

2012-11-23 Thread Mike Belopuhov
On Fri, Nov 23, 2012 at 5:16 PM, Reyk Floeter wrote: > On Fri, Nov 23, 2012 at 04:04:20PM +, Stuart Henderson wrote: >> This adds an ioctl to retrieve if_hardmtu, and adds code to >> display it via ifconfig hwfeatures. >> >> $ ifconfig em0 hwfeatures >> em0: flags=8b43 mtu >> 1500 >> hw

Re: pf: fixup stack corruption caused by pf_set_rt_ifp

2012-11-22 Thread Mike Belopuhov
On Thu, Nov 22, 2012 at 16:05 +0100, Mike Belopuhov wrote: > re pf bug on bugs@: > > apparently the crash is caused by the stack corruption that happens > in pf_map_addr as it expects to get an array of struct pf_src_node > pointers, not just one pointer. the bug was introd

Re: TX_/RX_CSUM on Intel I350/X540T

2012-11-22 Thread Mike Belopuhov
On Thu, Nov 22, 2012 at 7:34 PM, mxb wrote: > Hey tech@, > > I'll more than gladly test any diffs for . > > Regards, > Maxim > both have rx checksums enabled. tx checksums can't be enabled on i350 right now. tx checksums on ix will need henning's diff to go in first.

pf: fixup stack corruption caused by pf_set_rt_ifp

2012-11-22 Thread Mike Belopuhov
re pf bug on bugs@: apparently the crash is caused by the stack corruption that happens in pf_map_addr as it expects to get an array of struct pf_src_node pointers, not just one pointer. the bug was introduced about four years ago, but somehow (stack layout?) went unnoticed. the proper fix is to

Re: Disable modload(8)

2012-11-21 Thread Mike Belopuhov
On Wed, Nov 21, 2012 at 11:50 AM, Alexey E. Suslikov wrote: > Hello tech@. > > Following this > http://blog.crowdstrike.com/2012/11/http-iframe-injecting-linux-rootkit.html > > Besides of doing "#option LKM", is there any other way to disable modload(8)? > > Cheers, > Alexey > modules can't be lo

Re: UVM Page Fault with Ralink wlan and Best login/net fs config?

2012-11-16 Thread Mike Belopuhov
On Fri, Nov 16, 2012 at 18:44 +, sbienddr...@googlemail.com wrote: > As requested. > > ddb{0}> uvm_fault(0xd0a50760, 0x0, 0, 1) -> e > kernel: page fault trap, code=0 > Stopped atdb_read_bytes+0x14:movzbl0(%esi,%ecx,1),%eax > ddb{0}> ddb{0}> db_read_bytes(0,1,f58ded94,0,2) at db_re

Re: ##@!#@# gnu tools

2012-11-15 Thread Mike Belopuhov
On Thu, Nov 15, 2012 at 5:53 PM, Reyk Floeter wrote: > On Thu, Nov 15, 2012 at 5:11 PM, Marc Espie wrote: >> external people regularly ask "but why you don't want to use GNU/m4 GNU/make >> GNU/whatever ?" >> > > External people seem to ask weird questions. > > I just had to dig into autoconf/aut

Re: macppc: print uninorth/u3 revision number

2012-11-15 Thread Mike Belopuhov
On Thu, Nov 15, 2012 at 12:18 PM, Martin Pieuchot wrote: > Simple diff to print UniNorth's revision so it becomes easy to know > which AGP chipset people have without looking at the 'eeprom -p' output. > > before: > memc0 at mainbus0: uni-n > after: > memc0 at mainbus0: uni-n rev 0

athn@usb: splnet is required for rxeof

2012-11-11 Thread Mike Belopuhov
somehow splnet was forgotten in the receive path which leads to the following splassert: splassert: if_start: want 7 have 5 Starting stack trace... splassert_check() at splassert_check+0x7e if_start() at if_start+0x32 ieee80211_deliver_data() at ieee80211_deliver_data+0x1bd ieee80211_decap() at ie

Re: athn@usb: fixup detach panic

2012-11-09 Thread Mike Belopuhov
On Tue, Nov 06, 2012 at 12:15 +0100, Stefan Sperling wrote: > On Tue, Nov 06, 2012 at 11:32:19AM +0100, Mike Belopuhov wrote: > > attach fails early in case there's no firmware, but > > athn_detach does ieee80211_ifdetach and if_detach > > regardless of whether ifne

ix/82599 changes

2012-11-08 Thread Mike Belopuhov
the diff syncs up some pieces with freebsd and fixes some bugs (notably the one with the missing braces :) ixgbe_phy_aq is removed cause it's a x540 which is handled now by the separate module ixgbe_x540.c. i'd like to get rid of this change quickly as it somewhat clashes with other pending chang

ix: IFCAP_CSUM flags are pointless for the rx checksums

2012-11-07 Thread Mike Belopuhov
Remove code that is confusing and wrong: we don't want to disable rx checksumming if IFCAP_CSUM_IPv4 is set. Whatever this code used to mean in FreeBSD it doesn't do any good here. IXGBE_RXCSUM_PCSD is set when you do RSS (and is correctly handled in the visible RSS chunk below). OK? Index: if_

athn@usb: fixup detach panic

2012-11-06 Thread Mike Belopuhov
attach fails early in case there's no firmware, but athn_detach does ieee80211_ifdetach and if_detach regardless of whether ifnet part got setup correctly leading to a free of an unallocated memory and a panic. the following diff follows an established practice in the other drivers and fixes the p

Re: em(4): enable TCP/UDP checksum offload

2012-11-04 Thread Mike Belopuhov
On Sun, Nov 4, 2012 at 2:21 PM, Christian Weisgerber wrote: > Christian Weisgerber wrote: > >> Like bge(4), we previously couldn't enable TCP/UDP transmit checksum >> offload on em(4). We can now. >> >> Works fine here on >> em0 at pci1 dev 1 function 0 "Intel PRO/1000MT (82540EM)" rev 0x02 >>

ix(4): remove unused flow director code

2012-10-30 Thread Mike Belopuhov
Hi, Flow director is described as "a large number of flow affinity filters that direct receive packets by their flows to queues for classification, load balancing, and matching between flows and CPU cores." As we don't support anything like this the code (that is still compiled in but is not call

Re: Goodbye to you my file descriptor

2012-10-30 Thread Mike Belopuhov
On Tue, Oct 30, 2012 at 2:58 PM, Christiano F. Haesbaert wrote: > On 30 October 2012 14:36, rustyBSD wrote: >> MMmhh... >> >> == /usr/src/usr.bin/mg/dired.c == >> Go look the line 729: >> >> if ((fopen(dname,"r")) == NULL) { >> ... >> >> Now you can cry >> > > What is your point ? >

crypto(4): do allocations of dma accessible memory via dma_alloc(9)

2012-10-25 Thread Mike Belopuhov
Hi, In case you have a ubsec(4) or a hifn(4) crypto-accelerator plugged in to an amd64 with >4Gb of RAM, this diff should fix a crash for you in case you have enabled kern.usercrypto by doing buffer allocations of the "DMA-accessible memory" as most of the old^Wsupported crypto-accelerators can't

Kill NSC HYPERchannel leftover

2012-10-12 Thread Mike Belopuhov
Hi, Unless Miod objects, I'd like to kill this leftover. We don't seem to be ditching AF_* defines, so AF_HYLINK glory will be preserved. OK? diff --git sys/netinet/in_proto.c sys/netinet/in_proto.c index c146e49..0f7845f 100644 --- sys/netinet/in_proto.c +++ sys/netinet/in_proto.c @@ -322,25 +3

Re: Fix iked's auto-srcid based on the local hostname

2012-10-09 Thread Mike Belopuhov
On Tue, Oct 9, 2012 at 1:23 PM, Reyk Floeter wrote: > Hi, > > the iked.conf(5) manpage says: "If srcid is omitted, the default is to > use the hostname of the local machine, see hostname(1) to set or print > the hostname." This was true but I broke it with a commit about two > years ago :( > > The

Re: Problem in vr_stop()

2012-09-18 Thread Mike Belopuhov
diff looks good to me. ok mikeb On Tue, Sep 18, 2012 at 12:49 +0200, Gerhard Roth wrote: > Hi, > > we observed mysterious panics while stopping vr interfaces. This was due > to vr_stop() trying to stop the transfers but then not waiting for them > to really finish but rather remove their DMA buf

Re: PF: match ... tag ; pass tagged { , } keep state

2012-09-17 Thread Mike Belopuhov
On Mon, Sep 17, 2012 at 5:03 PM, Henning Brauer wrote: > * mxb [2012-09-10 17:51]: >> is there any plans to expand 'tagged' keyword in PF into list? > > not that I am aware of, but it would make sense to have list expansion > there as well. > would it mean "tagged foo AND bar" or "tagged foo OR

Re: [Patch] Virtio drivers for OpenBSD V7

2012-08-27 Thread Mike Belopuhov
On Wed, Aug 22, 2012 at 3:55 PM, Stefan Fritsch wrote: > Here is the current version. Changes from v6: > > - net: rename device vioif -> vio > - net: don't use watchdog for cleaning up tx descriptors > (in fact, remove watchdog completely) > - net: various fixes for RingEventIdx mode; should fix

Re: Small change to let mg handle localized characters

2012-08-23 Thread Mike Belopuhov
On Fri, Aug 24, 2012 at 12:55 AM, Stefan Sperling wrote: > For some bizarre reason emacs links to libossaudio instead ;) > yeah, an sndio backend is yet to be written... another reason to migrate to the superior pulse-audio framework!

Re: [Patch] Virtio drivers for OpenBSD V6

2012-08-21 Thread Mike Belopuhov
On Tue, Aug 21, 2012 at 1:35 PM, Stefan Fritsch wrote: > > What do yo suggest then? Use a separate timeout? Accept the lower > performance? > what is the performance difference in terms of pps on small packets and Mbps for large are we talking about? > Resetting the device in the watchdog has an

Re: [Patch] Virtio drivers for OpenBSD V6

2012-08-20 Thread Mike Belopuhov
On Mon, Aug 20, 2012 at 2:42 PM, Stefan Fritsch wrote: > On Mon, 20 Aug 2012, Mike Belopuhov wrote: >> >> On Mon, Aug 20, 2012 at 1:42 PM, Stefan Fritsch wrote: >>> >>> Because the interrupt load increases by approx. 7000 per second. I think >>> the >

Re: [Patch] Virtio drivers for OpenBSD V6

2012-08-20 Thread Mike Belopuhov
On Mon, Aug 20, 2012 at 1:42 PM, Stefan Fritsch wrote: > On Mon, 20 Aug 2012, Mike Belopuhov wrote: >>> >>> Always using the tx interrupt decreases performance significantly. On my >>> test system (in MBytes/s): >>> >>> Sending UDP from 75 t

Re: [Patch] Virtio drivers for OpenBSD V6

2012-08-20 Thread Mike Belopuhov
On Mon, Aug 20, 2012 at 1:28 PM, Stefan Fritsch wrote: > On Fri, 17 Aug 2012, Mike Belopuhov wrote: >> >> On Fri, Aug 17, 2012 at 1:17 PM, Stefan Fritsch wrote: >>> >>> On Thursday 16 August 2012, Mike Belopuhov wrote: >>>> >>>> cou

Re: [Patch] Virtio drivers for OpenBSD V6

2012-08-17 Thread Mike Belopuhov
On Fri, Aug 17, 2012 at 1:17 PM, Stefan Fritsch wrote: > On Thursday 16 August 2012, Mike Belopuhov wrote: >> could you please tell me if you're using tx interrupt or not? >> if yes, why do you need to have a watchdog code implement >> a txeof path and not the a

Re: [Patch] Virtio drivers for OpenBSD V6

2012-08-16 Thread Mike Belopuhov
On Thu, Aug 16, 2012 at 4:49 PM, Stefan Fritsch wrote: > Here is the next iteration: > > Changes from V5: > - Remove unused code for mutexes > - Remove explicit hardware memory barriers. If the host uses non-temporal > memory operations like movnti, it will hopefully issue the memory > barrier

Re: acpihpet quality

2012-08-15 Thread Mike Belopuhov
On Wed, Aug 15, 2012 at 5:36 PM, Mike Belopuhov wrote: > On Wed, Aug 15, 2012 at 5:02 PM, Ted Unangst wrote: >> The acpihpet timer is, in my testing, lots better than the acpitimer. >> Faster to read and more precise. They should not have the same quality >> value. Doubl

Re: acpihpet quality

2012-08-15 Thread Mike Belopuhov
On Wed, Aug 15, 2012 at 5:02 PM, Ted Unangst wrote: > The acpihpet timer is, in my testing, lots better than the acpitimer. > Faster to read and more precise. They should not have the same quality > value. Double acpihpet. > as long as acpi subsystem attaches acpitimer earlier we don't need tha

Re: [Patch] Virtio drivers for OpenBSD V5

2012-08-13 Thread Mike Belopuhov
On Mon, Aug 13, 2012 at 5:41 PM, Mike Belopuhov wrote: > On Mon, Aug 13, 2012 at 5:36 PM, Mike Belopuhov wrote: >> On Mon, Aug 13, 2012 at 5:30 PM, Stefan Fritsch >> wrote: >>> On Monday 13 August 2012 17:07:41 you wrote: >>>> > * Note: the i386 does

Re: [Patch] Virtio drivers for OpenBSD V5

2012-08-13 Thread Mike Belopuhov
On Mon, Aug 13, 2012 at 5:36 PM, Mike Belopuhov wrote: > On Mon, Aug 13, 2012 at 5:30 PM, Stefan Fritsch > wrote: >> On Monday 13 August 2012 17:07:41 you wrote: >>> > * Note: the i386 does not currently require barriers, but we must >>> > * provide the f

Re: [Patch] Virtio drivers for OpenBSD V5

2012-08-13 Thread Mike Belopuhov
On Mon, Aug 13, 2012 at 5:30 PM, Stefan Fritsch wrote: > On Monday 13 August 2012 17:07:41 you wrote: >> > * Note: the i386 does not currently require barriers, but we must >> > * provide the flags to MI code. >> > >> > This is not correct for virtio. We need a memory barrier. >> >> sure, copy i

Re: [Patch] Virtio drivers for OpenBSD V5

2012-08-13 Thread Mike Belopuhov
On Mon, Aug 13, 2012 at 4:24 PM, Stefan Fritsch wrote: > Hi, > > here is the next iteration of my patch. > > Changes from V4 include: > > - virtio: support RING_EVENT_IDX > - virtio: use lfence/sfence because __sync_synchronize() is broken > on gcc < 4.4 > - net: rework memory ha

Re: [Patch] Virtio drivers for OpenBSD V5

2012-08-13 Thread Mike Belopuhov
On Mon, Aug 13, 2012 at 4:24 PM, Stefan Fritsch wrote: > - virtio: use lfence/sfence because __sync_synchronize() is broken > on gcc < 4.4 please don't. use bus_space_barrier.

Support for Emulex OneConnect 10Gb Ethernet controllers

2012-08-02 Thread Mike Belopuhov
Driver was obtained from FreeBSD, but was heavily massaged. Test reports (if any) and OKs are welcome (: The diff is a just too large to inline, please find it here: http://theapt.org/~mike/files/oce.diff Cheers

Support for Intel X540, a 10Gbase-T (RJ45!) ethernet controller

2012-08-02 Thread Mike Belopuhov
Obtained from FreeBSD. Test reports (on any other ix cards as well) and OKs are welcome (: The diff is a bit too large to inline, please find it here: http://theapt.org/~mike/files/x540.diff Cheers

Re: Important MTRR change

2012-07-31 Thread Mike Belopuhov
On Tue, Jul 31, 2012 at 18:20 +0200, Mike Belopuhov wrote: > Hi, > > As it was recently discovered some newer machines have 40 bit > physical address size which means that the math that is good > for 36 bit paddr just doesn't cut it anymore. In fact the > memory region

Important MTRR change

2012-07-31 Thread Mike Belopuhov
Hi, As it was recently discovered some newer machines have 40 bit physical address size which means that the math that is good for 36 bit paddr just doesn't cut it anymore. In fact the memory region lengths we program into the MSRs are completely off. The following diff has some code ported from

Re: use time_uptime for various pf expirations

2012-07-29 Thread Mike Belopuhov
On Sun, Jul 29, 2012 at 5:47 PM, Hrvoje Popovski wrote: > > Hello, > > i have tested your patches with torrent box behind 2 firewalls (nat, > carp,pfsync). One firewall is patched and second box isn't. Both of them > quite often export flows with duration of 429496* > is it possible that these flo

Re: intermittent crash

2012-07-22 Thread Mike Belopuhov
On Sun, Jul 22, 2012 at 11:03 +0100, Stuart Henderson wrote: > On 2012/07/21 21:52, Mike Belopuhov wrote: > > On Sat, Jul 21, 2012 at 19:25 +0100, Stuart Henderson wrote: > > > On 2012/07/21 18:49, Mike Belopuhov wrote: > > > > this sppp_clear_ip_addrs_args dance lo

Re: SNMPv3 Support

2012-07-18 Thread Mike Belopuhov
On Wed, Jul 18, 2012 at 4:16 PM, Gerhard Roth wrote: >> same here, wouldn't it be possible to match the ipsec.conf grammar and >> ignore the SNMPv3 naming a bit? >> >> auth hmac-sha1 authkey "fooobar" enc aes enckey "dkjdkj" >> - instead of - >> hmac sha authpass "foobar" cipher aes privpass "dkjdk

Re: PF_PRIO_NOTSET wasn't such a smart attempt

2012-07-17 Thread Mike Belopuhov
On Wed, Jul 11, 2012 at 13:13 +0200, Henning Brauer wrote: > ..because now you had to initialize both set_prio in pf_rule to it > everywhere. we did that, at least in some parts of our tree... > problem being of course that 0 is a valid value there and can\t easily > be used as "don't touch" indica

Re: AES-{192,256}-CTR with isakmpd

2012-06-29 Thread Mike Belopuhov
On Fri, Jun 29, 2012 at 7:20 PM, Christian Weisgerber wrote: > And the corresponding bits for iked(8).  I don't think we need to keep > "aes-ctr" for compatibility there, do we? > i'm a sitting on a fence a little bit. i don't really mind either way hence my OK for the diff.

Re: Bridge rules

2012-06-29 Thread Mike Belopuhov
On Fri, Jun 29, 2012 at 1:36 PM, Henning Brauer wrote: > now it's very unclear what your actual problem is - the struct is > called ifbreq and used in a number of places, most notably of course > the ioctls. > he's trying to add patterns to the mac address matching code and pretends to be done wi

Re: wbsio: Add support for Winbond W83627UHG

2012-06-29 Thread Mike Belopuhov
On Fri, Jun 29, 2012 at 5:41 AM, Lawrence Teo wrote: > This diff adds support for the Winbond W83627UHG chip, as found on the > Lanner FW-7539 appliance.  This diff was ported from DragonFly BSD: > > http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/245ec76bc1613b22cf282 526fa9931e4c16e4237

Re: AES-{192,256}-CTR with isakmpd

2012-06-28 Thread Mike Belopuhov
On Fri, Jun 29, 2012 at 12:09 AM, Christian Weisgerber wrote: > Is there a particular reason we only support AES-128-CTR ("AESCTR") > with isakmpd(8), but not the 192- and 256-bit variants like we do > for AES-CBC and AES-GCM? > > If not, and I assume it's just a historic oversight, how about this

Re: bnx(4) flow control support.

2012-06-28 Thread Mike Belopuhov
On Thu, Jun 28, 2012 at 16:07 +0200, Peter Hessler wrote: > So we have been running with this diff in the office, and it is working > well for us. > > > bnx0 at pci7 dev 0 function 0 "Broadcom BCM5709" rev 0x20: apic 0 int 6 > bnx0: address 1c:c1:de:e4:5e:b0 > brgphy0 at bnx0 phy 1: BCM5709 10/10

pfsync fixes

2012-06-27 Thread Mike Belopuhov
hi, one of the last pfsync "improvements" (r1.180) by yours truly introduced some nasty regressions for those running pfsync over the crossover cable. i apologize for all the inconveniences. peter hessler, kapeatanakis giannis and myself have been trying very hard to get this fixed. we have iden

Re: cwm tiling

2012-06-09 Thread Mike Belopuhov
On Sat, Jun 9, 2012 at 12:41 PM, Stuart Henderson wrote: > On 2012/06/09 14:09, Alexander Polakov wrote: >> > I appreciate that the defaults would stay the same, but really, >> > what is the point in doing this?  cwm can't be everything to >> > everyone. >> >> The point is: when you want tiling fr

Re: add AMT ports to /etc/services

2012-06-02 Thread Mike Belopuhov
On Sat, Jun 2, 2012 at 11:02 AM, Stuart Henderson wrote: > As with other entries in /etc/services, this adds to the ports to > net.inet.tcp.baddynamic, preventing using the associated ports as a > valid dynamic source port number. > > OK? > sounds like a reasonable thing to do. ok mikeb

Re: Intel AHCI RAID controller in Sony VAIO Z23 laptop

2012-05-31 Thread Mike Belopuhov
On Thu, May 31, 2012 at 10:53 +0200, Paul de Weerd wrote: > I've recently bought a new Sony laptop, VPCZ23C5E. Some things on > this machine work fine (sound, suspend, wired network), some things > don't (X, resume, wireless). One of the problems I have is that > -current doesn't find any disks b

Re: Intel Atom E600 watchdog(4) support

2012-05-24 Thread Mike Belopuhov
gt;> >> Yes, I got a couple of private mails stating the same, which explains >> why I hadn't seen any others. Anyway, Mike Belopuhov suggested pchpcib >> as an alternative name so I've renamed the driver to that along with >> the man pages, etc. > > I'

Re: Intel Atom E600 watchdog(4) support

2012-05-24 Thread Mike Belopuhov
t; why I hadn't seen any others. Anyway, Mike Belopuhov suggested pchpcib > as an alternative name so I've renamed the driver to that along with > the man pages, etc. > > Here's the dmesg now: > > ---8<--- > pchpcib0 at pci0 dev 31 function 0 "Intel E600

IPsec: support for Extended Sequence Numbers (ESN) - iked

2012-05-21 Thread Mike Belopuhov
esn is 90% supported in iked and this just adds some missing pieces. works with strongswan and windows (although windows doesn't propose ESN it's also a good test). diff --git sbin/iked/iked.h sbin/iked/iked.h index dc31da4..ce25bb3 100644 --- sbin/iked/iked.h +++ sbin/iked/iked.h @@ -156,6 +156,7

IPsec support for Extended Sequence Numbers (ESN) - ipsecctl

2012-05-21 Thread Mike Belopuhov
this allows ipsecctl to print 'esn' flag nicely: # ipsecctl -ssa ah tunnel from 10.2.0.6 to 10.2.0.5 esn spi 0xbeefdead auth hmac-md5 ah tunnel from 10.2.0.5 to 10.2.0.6 esn spi 0xdeadbeef auth hmac-md5 there's no real value in confi

IPsec: support for Extended Sequence Numbers (ESN) - Kernel

2012-05-21 Thread Mike Belopuhov
the following diff adds support for the 64-bit extended sequence numbers specified by RFC 4303. briefly, interesting points are: - only lower 32-bit part is transmitted so packet is not changed; - high-oder part is kept private and is used differently by HMAC and other MAC hashes (such as GC

Re: [patch] em: interrupt starvation

2012-05-10 Thread Mike Belopuhov
On Thu, May 10, 2012 at 15:22 +0200, Erik Lax wrote: > Hi, > > I came across a real-world scenario where network traffic stopped due to > interrupt starvation with the em driver, tested with a few different > cards (on a network/interface where no packets were received). This is > what caused it.

Re: sti: support reverse video attribute

2012-05-05 Thread Mike Belopuhov
On Sat, May 05, 2012 at 16:07 +, Miod Vallat wrote: > > add support for the WSATTR_REVERSE attribute to sti(4) to make mg, > > less and others a bit prettier. tested on visualize fx 10 pro where > > this email was written. > > > > tests on other sti's are welcome as well as oks (: > > This is

sti: support reverse video attribute

2012-05-05 Thread Mike Belopuhov
add support for the WSATTR_REVERSE attribute to sti(4) to make mg, less and others a bit prettier. tested on visualize fx 10 pro where this email was written. tests on other sti's are welcome as well as oks (: Index: dev/ic/sti.c ===

print sequence numbers as unsigned

2012-05-02 Thread Mike Belopuhov
sequence numbers in esp and ah are unsigned numbers, so we shouldn't ever be printing them with a minus sign :-) ok? Index: usr.sbin/tcpdump/print-ipsec.c === RCS file: /home/cvs/src/usr.sbin/tcpdump/print-ipsec.c,v retrieving revisi

sys_pipe: take fd table lock after allocating memory

2012-04-21 Thread Mike Belopuhov
there's no apparent need to take a file descriptor table lock before we've done allocating pipe structures and buffers. ok? Index: sys/kern/sys_pipe.c === RCS file: /home/cvs/src/sys/kern/sys_pipe.c,v retrieving revision 1.61 diff -u

Re: IPv6: fixup route priorities for RA and redirects

2012-04-20 Thread Mike Belopuhov
I'm still looking for OKs on this. On Mon, Apr 02, 2012 at 14:42 +0200, Mike Belopuhov wrote: > When route priorities were added to the RA/redirects code, all > of them got set to RTP_CONNECTED. Most importantly, rt6_flush > was made to flush only RTP_CONNECTED routes.

Re: IPv6: TLLA must be included with NA sent to multicast address

2012-04-20 Thread Mike Belopuhov
I'm still looking for OKs on this. On Mon, Apr 02, 2012 at 14:28 +0200, Mike Belopuhov wrote: > RFC 4861 says: > > Target link-layer address > The link-layer address for the target, i.e., the > sender of the advertisement.

Re: IPv6: change NOSTATE->INCOMPLETE for NS/NA/RDR w/o TLLA

2012-04-20 Thread Mike Belopuhov
I'm still looking for OKs on this. On Mon, Apr 02, 2012 at 14:18 +0200, Mike Belopuhov wrote: > So when TLLA/SLLA is not specified we get into a weird state where > we don't know a LL address and don't ask for it. Apparently, this > is not what some IPv6 compliance te

Re: save and restore %gs and gs.base on context switches

2012-04-19 Thread Mike Belopuhov
On Sat, Apr 14, 2012 at 13:35 +0200, Mike Belopuhov wrote: > some software needs fully functional per-thread %gs base address, > hence the diff. limited testing shows no regressions. > INTR_RESTORE_SELECTORS changes include: > - %r11 is used to store curpcb instead of rdx that

Re: save and restore %gs and gs.base on context switches

2012-04-14 Thread Mike Belopuhov
On Sat, Apr 14, 2012 at 3:42 PM, Mark Kettenis wrote: >> > some software needs fully functional per-thread %gs base address, >> > hence the diff. limited testing shows no regressions. >> > INTR_RESTORE_SELECTORS changes include: >> > - %r11 is used to store curpcb instead of rdx that is used

save and restore %gs and gs.base on context switches

2012-04-14 Thread Mike Belopuhov
Er EFAULT +.Fa base +points outside the process's allocated address space. +.El +.Sh SEE ALSO +.Xr __tfork 2 , +.Xr fork 2 Index: lib/libarch/amd64/amd64_get_gsbase.c === RCS file: lib/libarch/amd64/amd64_get_gsbase.c diff -N

Re: diff: fix waiting problem on AMD Hudson's AHCI (Re: AMD APU report)

2012-04-12 Thread Mike Belopuhov
On Thu, Apr 12, 2012 at 22:40 +0900, SASANO Takayoshi wrote: > Hello, > > > I have a system with an asrock a75m-itx motherboard and an amd a6-3500 > > processor. I notice there is a 40 second delay after the 'ahci0 at pci0 > > dev 17 > > ...' line. > > I have IBM's ThinkPad Edge E525, AMD A8

Re: move accounting flags from the proc to the process

2012-04-12 Thread Mike Belopuhov
On Wed, Apr 11, 2012 at 19:30 +0200, Mike Belopuhov wrote: > This moves the accounting flag to struct process where it belongs. > The main rationale is that accounting flags are being collected on > the program exit. Ok? > don't set AFORK when forking threads pointed out by

move accounting flags from the proc to the process

2012-04-11 Thread Mike Belopuhov
This moves the accounting flag to struct process where it belongs. The main rationale is that accounting flags are being collected on the program exit. Ok? Index: kern/kern_acct.c === RCS file: /cvs/src/sys/kern/kern_acct.c,v retriev

correct suser flag usage

2012-04-11 Thread Mike Belopuhov
guenther@ has pointed out that sometimes suser is passed an incorrect flags argument. Currently, there's only one flag that's defined: SUSER_NOACCT (0x1). Unfortunately it aligns too well with AFORK flag used with p_acflag. This diff cleans up the tree. OK? Index: dev/pci/if_san_obsd.c ==

Re: diff: improving msdosfs write speed for large files

2012-04-05 Thread Mike Belopuhov
On Thu, Apr 5, 2012 at 9:21 AM, Alexander Polakov wrote: > * Mike Belopuhov [120404 17:51]: >> i agree that this is a great find. i don't really like the diff though. >> i see no point in introducing this macro. what do others think? > > Your diff looks better to me.

Re: diff: improving msdosfs write speed for large files

2012-04-04 Thread Mike Belopuhov
On Wed, Apr 04, 2012 at 14:42 +0400, Alexander Polakov wrote: > This is a diff from NetBSD pr.34583: > http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=34583 > > Quoting the author: > > "I noticed that when writing large file (hundreds of megabytes) > to an msdos disk, the wr

Re: IPv6: incorrect routing header should yield ICMP6_PARAMPROB_HEADER

2012-04-03 Thread Mike Belopuhov
On Tue, Apr 03, 2012 at 13:15 +0200, Mike Belopuhov wrote: > According to the RFC 2460 and RFC 5095, ICMP Parameter Problem, Code 0 > should be sent, not Code 2. OK? > > (while at the spot, kill a trailing whitespace) > we have improved the diff with sperreault@ to set a pointe

IPv6: incorrect routing header should yield ICMP6_PARAMPROB_HEADER

2012-04-03 Thread Mike Belopuhov
According to the RFC 2460 and RFC 5095, ICMP Parameter Problem, Code 0 should be sent, not Code 2. OK? (while at the spot, kill a trailing whitespace) diff --git sys/netinet6/ip6_input.c sys/netinet6/ip6_input.c index 6afde60..e554ad7 100644 --- sys/netinet6/ip6_input.c +++ sys/netinet6/ip6_inpu

IPv6: fixup route priorities for RA and redirects

2012-04-02 Thread Mike Belopuhov
When route priorities were added to the RA/redirects code, all of them got set to RTP_CONNECTED. Most importantly, rt6_flush was made to flush only RTP_CONNECTED routes. The purpose of rt6_flush is to flush *all* routes going via a specified gw. Now the problem is that the code in rtrequest1/mpa

IPv6: TLLA must be included with NA sent to multicast address

2012-04-02 Thread Mike Belopuhov
RFC 4861 says: Target link-layer address The link-layer address for the target, i.e., the sender of the advertisement. This option MUST be included on link layers that have addresses when responding to multi

IPv6: change NOSTATE->INCOMPLETE for NS/NA/RDR w/o TLLA

2012-04-02 Thread Mike Belopuhov
So when TLLA/SLLA is not specified we get into a weird state where we don't know a LL address and don't ask for it. Apparently, this is not what some IPv6 compliance tests expect. For example Tahi really wants you to ask for a LLA by sending a neighbor solicitation which means state should be INC

IPv6: check redirect message destination before other expensive checks

2012-04-02 Thread Mike Belopuhov
no need to do route lookup and perform other expensive checks if redirect destination is not unicast. this just moves this check a bit up. ok? diff --git sys/netinet6/icmp6.c sys/netinet6/icmp6.c index 1501766..40361f4 100644 --- sys/netinet6/icmp6.c +++ sys/netinet6/icmp6.c @@ -2212,6 +2212,13

Re: trasport-mode ESP packet and pf `rdr-to'

2012-03-15 Thread Mike Belopuhov
On Thu, Mar 15, 2012 at 19:34 +0900, YASUOKA Masahiko wrote: > On Thu, 15 Mar 2012 09:16:42 +0100 > Alexander Bluhm wrote: > > On Wed, Mar 14, 2012 at 03:32:08PM +0900, YASUOKA Masahiko wrote: > >> In ip_input(), there is a filter to disable all packets to 127.0.0.0/27. > >> That filter drops a pa

Re: pf pptp nat

2012-03-15 Thread Mike Belopuhov
we had this discussion recently and the outcome is: show the *actual* diff that "was close to getting committed". so far there hasn't been any. On Thu, Mar 15, 2012 at 11:31 AM, Mitja MuE>eniD wrote: > Hey, > > there was a longish thread here roughly 4 years ago titled "[patch] pf PPTP > nat pa

Re: gif: allow layer2 tunnels over ipv6

2012-03-13 Thread Mike Belopuhov
On Tue, Mar 13, 2012 at 16:51 +, Stuart Henderson wrote: > On 2012/03/13 16:41, Mike Belopuhov wrote: > > this allows us to bridge two ipv4 networks over an ipv6 link with gif. > > any objections? oks? the change was well tested by phessler. > > > > Not that it

gif: allow layer2 tunnels over ipv6

2012-03-13 Thread Mike Belopuhov
this allows us to bridge two ipv4 networks over an ipv6 link with gif. any objections? oks? the change was well tested by phessler. diff --git netinet6/in6_proto.c netinet6/in6_proto.c index 7575055..8cf3de4 100644 --- netinet6/in6_proto.c +++ netinet6/in6_proto.c @@ -105,6 +105,7 @@ #include

Re: ubsec: generate proper mbuf chain for destination

2012-03-13 Thread Mike Belopuhov
On Tue, Mar 13, 2012 at 15:11 +0200, Joosep wrote: > On Tue, Mar 13, 2012 at 2:20 PM, Mike Belopuhov wrote: > > > heh. does this diff make a difference? > > > Hi! > > No difference. Previously given packet sizes were with SHA1+3DES not with > AES as said earlier.

Re: ubsec: generate proper mbuf chain for destination

2012-03-13 Thread Mike Belopuhov
s. > Unfortunately i didn't had the chance to pinpoint the exact packet sizes. I > haven't tested with MD5 yet. > > With the diff, previously sent off-list by Mike, there was no verification > errors(with SHA1+AES and SHA1+3DES) in 24 hours. > > Thanks, >

ubsec: generate proper mbuf chain for destination

2012-03-12 Thread Mike Belopuhov
ubsec gets stuck after receiving a packet of a particular length. for example, in my tests it was a tcp packet with 59 bytes of payload. interestingly, something breaks horribly in the hardware and it stops processing any other packets. the exact cause is believed to be a difference between the s

ftp-proxy: use correct incoming rdomain

2012-03-06 Thread Mike Belopuhov
ftp-proxy has all the code to support "on rdomain" feature in place, just not used. the change below uses an rdomain obtained via the SO_RTABLE socket option of the accepted socket. OK? Index: filter.c === RCS file: /home/cvs/src/us

Re: SMBus support for AMD CS5536 (glxpcib)

2012-03-04 Thread Mike Belopuhov
On Sun, Feb 26, 2012 at 17:00 +0100, Mike Belopuhov wrote: > On Sat, Feb 25, 2012 at 15:46 +0100, Mike Belopuhov wrote: > > hi, > > > > here's a diff that adds support for the SMBus controller found > > on AMD CS5536: > > > > glxpcib0 at pci0 dev 15

icmp error mcopy diff

2012-03-01 Thread Mike Belopuhov
This is a well-known from thib and dlg originally with a length fix from yours truly, that marginally doubles througput (from 300kpps to 500-600kpps on selected hardware). The idea is to save an IP header and 8 bytes of payload (good enough for tcp state tracking) instead of recommended 68 bytes.

Re: SMBus support for AMD CS5536 (glxpcib)

2012-02-26 Thread Mike Belopuhov
On Sat, Feb 25, 2012 at 15:46 +0100, Mike Belopuhov wrote: > hi, > > here's a diff that adds support for the SMBus controller found > on AMD CS5536: > > glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit > 3579545Hz timer, watchdo

SMBus support for AMD CS5536 (glxpcib)

2012-02-25 Thread Mike Belopuhov
hi, here's a diff that adds support for the SMBus controller found on AMD CS5536: glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit 3579545Hz timer, watchdog, gpio, i2c gpio0 at glxpcib0: 32 pins iic0 at glxpcib0 maxtmp0 at iic0 addr 0x4c: lm86 # sysctl hw.sensors hw.s

Re: ix: better inter-interrupt intervals

2012-02-14 Thread Mike Belopuhov
Still looking for ok's... On Sat, Feb 11, 2012 at 01:27 +0100, Mike Belopuhov wrote: > Hi, > > As it became evident, ix is driven by Low Latency Interrupts > on 82599 to do all sorts of processing instead of the regular > Rx/Tx queue interrupts. LLI is an additional facilit

<    4   5   6   7   8   9   10   11   >