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 guenther; missed suser

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-3500M

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

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

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 polac...@gmail.com wrote: * Mike Belopuhov m...@crypt.org.ru [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 writing

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 +++

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 pointer field as well

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

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

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

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

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 MuEeniD mi...@muzenic.net wrote: Hey, there was a longish thread here roughly 4 years ago titled [patch] pf

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 alexander.bl...@gmx.net 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

Re: ubsec: generate proper mbuf chain for destination

2012-03-13 Thread Mike Belopuhov
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, Joosep On Mon, Mar 12, 2012 at 5:14 PM, Mike Belopuhov m...@crypt.org.ru wrote: ubsec gets

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 @@

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

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:

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 function 0 AMD CS5536 ISA rev 0x03: rev 3, 32-bit

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, watchdog, gpio, i2c gpio0 at glxpcib0: 32 pins iic0

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

ix: better inter-interrupt intervals

2012-02-10 Thread Mike Belopuhov
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 facility that is aimed to do out of band signalling for certain conditions. Therefore it has it's own interrupt moderation

Re: db_read_bytes uvm_fault

2012-02-01 Thread Mike Belopuhov
On Wed, Feb 01, 2012 at 17:12 +, Miod Vallat wrote: Machine needs an update anyway, but does anyone know offhand what this might be? Dereference of a NULL (or invalid) function pointer, coupled with the lack of smarts of the ddb code. (part of my ddb todolist somewhere) Miod

Re: sppp(4): remove some crap

2012-01-28 Thread Mike Belopuhov
On Sat, Jan 28, 2012 at 12:06 PM, Stuart Henderson s...@spacehopper.org wrote: Any comments? (bleurgh is implicitly assumed). OK? This mail was sent through a router running it. hi, if you remove pp_fastq, why don't i see it being removed from the header file?

Re: ix(4) driver Bugfix

2012-01-20 Thread Mike Belopuhov
On Fri, Jan 20, 2012 at 3:08 PM, Christian Ehrhardt christian_ehrha...@genua.de wrote: Hi! the ix(4)-Driver stores a pointer to the pci_attach_args structure (as passed to ixgbe_attach) in its softc. However, the pci_attach_args structure lives on the stack somewhere in autoconf, i.e. its

Re: ix: fixup hardware vlan tagging and stripping

2012-01-12 Thread Mike Belopuhov
Hi, If there's no objections, I'm going to commit it soon. Thanks On Tue, Dec 20, 2011 at 15:30 +0100, Mike Belopuhov wrote: hi, hardware vlan tagging/stripping got broken with the driver update. freebsd people have changed the code to handle events from the vlan(4) pseudo-device

ix: fixup hardware vlan tagging and stripping

2011-12-20 Thread Mike Belopuhov
hi, hardware vlan tagging/stripping got broken with the driver update. freebsd people have changed the code to handle events from the vlan(4) pseudo-device into the hardware driver. so when you configure new vlan a special function is called and driver can setup a vlan filtering table. because

Re: pfctl: ubreak optimizer

2011-12-19 Thread Mike Belopuhov
got an ok from henning, anyone else cares to comment? On Tue, Dec 13, 2011 at 00:40 +0100, Mike Belopuhov wrote: updating regress tests, i've noticed that some of the optimizer tests are failing with additional (unoptimized) rules popping out. digging deeper has shown that is indeed a bug

Re: uvm_fault in Dec. 15 amd64 snapshot

2011-12-19 Thread Mike Belopuhov
On Sun, Dec 18, 2011 at 18:50 -0800, James A. Peltier wrote: - Original Message - | Hi All, | | Today is our semester maintenance day and we've upgraded our backup | bridge firewall to the Dec. 15, 2011 snapshot available from | ftp.openbsd.org and I'm getting this odd error when I

Re: pf: fix icmp direction check

2011-12-19 Thread Mike Belopuhov
i've decided to rewrite the description to faciliate the review process. currently icmp6-icmp translation fails because of the incorrect icmp direction check in pf_icmp_state_lookup. first of all it checks all icmp packets except for the echo reply. the reasons for this are unknown. it works

Re: uvm_fault in Dec. 15 amd64 snapshot

2011-12-19 Thread Mike Belopuhov
On Mon, Dec 19, 2011 at 21:46 +0100, Mike Belopuhov wrote: On Sun, Dec 18, 2011 at 18:50 -0800, James A. Peltier wrote: - Original Message - | Hi All, | | Today is our semester maintenance day and we've upgraded our backup | bridge firewall to the Dec. 15, 2011 snapshot

ntfs: respect the MNT_FORCE flag upon unmount

2011-12-19 Thread Mike Belopuhov
this is an improved diff that addresses the problem with forced unmount of the ntfs filesystem in situations like the one described here: http://marc.info/?l=openbsd-bugsm=132257956328474w=2 ntfs keeps a bunch of vnodes opened and marked as VSYSTEM including the mount point: it's usecount is 1

Re: ssh client memory leak

2011-12-17 Thread Mike Belopuhov
On Sat, Dec 17, 2011 at 8:48 AM, Loganaden Velvindron logana...@devio.us wrote: command is initialised in main but not freed before exit. because there's no reason to do it. when program terminates all resources are returned to the operating system.

pfctl: ubreak optimizer

2011-12-12 Thread Mike Belopuhov
updating regress tests, i've noticed that some of the optimizer tests are failing with additional (unoptimized) rules popping out. digging deeper has shown that is indeed a bug introduced by af-to (sorry!). the fix is simple though. ok? Index: parse.y

pf: fix for the af-to regression on match rules

2011-12-09 Thread Mike Belopuhov
pfctl should not infer the af-to behavior from the af/naf difference. instead, we should be clear that this is an af-to rule. essentially this diff converts FOM_AFTO marker into a rule flag PFRULE_AFTO so that we don't rely on ambiguous checks (like r-af != r-naf) when setting things up. also,

pf: fix icmp direction check

2011-12-09 Thread Mike Belopuhov
still looking for ok's for this version of the diff. although i've got mcbride's and claudio's oks for the older version, this is the one i consider correct. On Fri, Oct 28, 2011 at 3:59 PM, Mike Belopuhov m...@crypt.org.ru wrote: hi, icmp6-icmp translation does't work because of the strange

ix: don't forget to m_freem stuff in the error paths

2011-12-08 Thread Mike Belopuhov
there are some m_freem's missing in the error code paths. i guess that's because freebsd code is a bit different and we didn't look closely at it. ok? diff --git dev/pci/if_ix.c dev/pci/if_ix.c index 4468401..8ab83f8 100644 --- dev/pci/if_ix.c +++ dev/pci/if_ix.c @@ -2547,7 +2547,7 @@

ix: schedule an rxrefill callout correctly

2011-12-08 Thread Mike Belopuhov
we need to always schedule another rx ring refill callout in case we fail to do it at the spot. previously what would happen is that say we have 2 clusters on the rx ring and we schedule an rxrefill callout that fails to update the ring. then we still have those 2 clusters around. under heavy

ix: no reason to enable interrupts that we don't know how to handle

2011-12-08 Thread Mike Belopuhov
we don't do intel i/oat and don't set up parameters for the tcp timer interrupts, therefore there's no reason we should enable the interrupt itself. ok? diff --git dev/pci/ixgbe_type.h dev/pci/ixgbe_type.h index 601c6d5..b59 100644 --- dev/pci/ixgbe_type.h +++ dev/pci/ixgbe_type.h @@

Re: ix: improve performance

2011-12-08 Thread Mike Belopuhov
On Fri, Nov 25, 2011 at 15:02 +0100, Mike Belopuhov wrote: hi, i've spent a week trying to fix performance regression in ix(4) since the introduction of the new driver and this is where i'm right now. with the following change machine is able to sustain 760kpps and reach 9Gbit/s

Re: ix: don't forget to m_freem stuff in the error paths

2011-12-08 Thread Mike Belopuhov
On Thu, Dec 08, 2011 at 17:46 +0100, Mike Belopuhov wrote: there are some m_freem's missing in the error code paths. i guess that's because freebsd code is a bit different and we didn't look closely at it. ok? @@ -2601,6 +2604,8 @@ no_split: error = bus_dmamap_load_mbuf(rxr

Re: ix: no need to rearm interrupts, we only need to reenable queues

2011-11-27 Thread Mike Belopuhov
On Sun, Nov 27, 2011 at 8:58 AM, Claudio Jeker clau...@openbsd.org wrote: On Fri, Nov 25, 2011 at 02:43:38PM +0100, Mike Belopuhov wrote: shaves off some bus read/write operations. tested on 82598 and 82599. ok? On what information is this based? The intel driver in .Fx does not do

ix: no need to rearm interrupts, we only need to reenable queues

2011-11-25 Thread Mike Belopuhov
shaves off some bus read/write operations. tested on 82598 and 82599. ok? diff --git a/dev/pci/if_ix.c b/dev/pci/if_ix.c index 2c0d8e0..e3b575f 100644 --- a/dev/pci/if_ix.c +++ b/dev/pci/if_ix.c @@ -917,7 +917,7 @@ ixgbe_legacy_irq(void *arg) struct tx_ring *txr = sc-tx_rings;

ix: bring back low latency interrupt moderation for 82599

2011-11-25 Thread Mike Belopuhov
lost while upgrading the driver. originally from claudio in rev1.46. tested on 82599 w/ sfp+. ok? diff --git a/dev/pci/if_ix.c b/dev/pci/if_ix.c index e3b575f..cec0c99 100644 --- a/dev/pci/if_ix.c +++ b/dev/pci/if_ix.c @@ -635,8 +635,7 @@ ixgbe_init(void *arg) struct ifnet*ifp =

ix: bring back checksum fix

2011-11-25 Thread Mike Belopuhov
checksum fix from reyk (rev1.31) was lost during update: Fix the IP ckecksum offloading logic that disables and breakes offloading if the packet is neither TCP nor UDP because of an erroneous default case. No functional change in the default build because IP checksum offloading is currently

ix: improve performance

2011-11-25 Thread Mike Belopuhov
hi, i've spent a week trying to fix performance regression in ix(4) since the introduction of the new driver and this is where i'm right now. with the following change machine is able to sustain 760kpps and reach 9Gbit/s of forwarding performance. (the other change that is very likely affecting

Re: ix: no need to rearm interrupts, we only need to reenable queues

2011-11-25 Thread Mike Belopuhov
On Fri, Nov 25, 2011 at 2:43 PM, Mike Belopuhov m...@crypt.org.ru wrote: shaves off some bus read/write operations. tested on 82598 and 82599. ok? regenerated without git prefixes. should apply cleanly now. diff --git dev/pci/if_ix.c dev/pci/if_ix.c index 2c0d8e0..e3b575f 100644 --- dev/pci

Re: ix: bring back low latency interrupt moderation for 82599

2011-11-25 Thread Mike Belopuhov
On Fri, Nov 25, 2011 at 2:45 PM, Mike Belopuhov m...@crypt.org.ru wrote: lost while upgrading the driver. originally from claudio in rev1.46. tested on 82599 w/ sfp+. ok? regenerated w/o git prefixes: diff --git dev/pci/if_ix.c dev/pci/if_ix.c index e3b575f..cec0c99 100644 --- dev/pci

Re: ix: bring back checksum fix

2011-11-25 Thread Mike Belopuhov
On Fri, Nov 25, 2011 at 2:48 PM, Mike Belopuhov m...@crypt.org.ru wrote: checksum fix from reyk (rev1.31) was lost during update: Fix the IP ckecksum offloading logic that disables and breakes offloading if the packet is neither TCP nor UDP because of an erroneous default case. No functional

Re: ix: improve performance

2011-11-25 Thread Mike Belopuhov
On Fri, Nov 25, 2011 at 3:02 PM, Mike Belopuhov m...@crypt.org.ru wrote: hi, i've spent a week trying to fix performance regression in ix(4) since the introduction of the new driver and this is where i'm right now. with the following change machine is able to sustain 760kpps and reach 9Gbit

Re: October 13 2011 NAT update

2011-10-28 Thread Mike Belopuhov
On Fri, Oct 28, 2011 at 12:09 PM, Tom Murphy open...@pertho.net wrote: You guys might want to add a note to current.html that from October 13 2011, the NAT updates have made it impossible to not use an address family in a nat-to statement. The following statement fails now: match out on

Re: inet6 constants for addrs

2011-10-10 Thread Mike Belopuhov
On Mon, Oct 10, 2011 at 7:37 AM, patrick keshishian sids...@boxsoft.com wrote: I know nothing of IPv6 stuff, but is this line removal a typo or an intended change? there's a bzero call above.

Re: routing bug?

2011-10-02 Thread Mike Belopuhov
you didn't remove an ip address from ral0 after bringing it down. On Sun, Oct 2, 2011 at 5:13 PM, David Coppa dco...@gmail.com wrote: Am I stupid or there's a bug with routing? This is what I've found when I was trying to switch from the internal wireless card in my laptop to an external usb

Re: OpenBSD 4.9 iked (Ikev2)

2011-08-19 Thread Mike Belopuhov
it doesn't. On Fri, Aug 19, 2011 at 6:44 PM, Gaurav Kansal kansal.gau...@gmail.com wrote: Any idea if it supports transport mode? That seems to be missing. Regards, Gaurav Kansal +91 98454 22400 http://gkansal.blogspot.com On Wed, Jul 13, 2011 at 7:14 AM, Mike Belopuhov m

Re: Test max_states as part of the rule matching

2011-08-10 Thread Mike Belopuhov
On Wed, Aug 10, 2011 at 21:49 +0900, Ryan McBride wrote: On Wed, Aug 10, 2011 at 01:07:28PM +0200, Henning Brauer wrote: this is indeed the way it was supposed to work. I dissagree. This is not at all what my understanding was of how it was supposed to work. You'd have to talk to dhartmei

Re: Assigning source addresses with IPV6_PKTINFO

2011-08-05 Thread Mike Belopuhov
of problems with assigning addresses that don't belong us. opinions? On Thu, Aug 04, 2011 at 23:29 +0200, Mike Belopuhov wrote: i saw what kame did. be my guest and try to port that. On Thu, Aug 4, 2011 at 11:23 PM, Alexander Bluhm alexander.bl...@gmx.net wrote: On Thu, Aug 04, 2011 at 05:06:24PM

Assigning source addresses with IPV6_PKTINFO

2011-08-04 Thread Mike Belopuhov
Hi, Currently it's possible to assign *any* IPv6 source address to the datagram sent out by the unprivileged process by supplying a IPV6_PKTINFO control message to the sendmsg(2). I'm not sure it's a desired behavior and afaik it's not possible to achieve this with IPv4 sockets without the need

Re: rdr-to ::1

2011-08-02 Thread Mike Belopuhov
On Mon, Aug 1, 2011 at 11:59 PM, Alexander Bluhm alexander.bl...@gmx.net wrote: On Wed, Jul 27, 2011 at 12:44:21AM +0200, Alexander Bluhm wrote: On Fri, May 20, 2011 at 11:54:09AM +0200, Camiel Dobbelaar wrote: I'll spend some more time on this, but maybe there's an IPv6 guru that can lend a

Re: OpenBSD 4.9 iked (Ikev2)

2011-07-12 Thread Mike Belopuhov
no. On Tue, Jul 12, 2011 at 1:47 PM, Gaurav Kansal kansal.gau...@gmail.com wrote: Hi Is there a list available of supported/missing features in iked? Regards, Gaurav Kansal

Re: pthread_key_delete doesn't reset values

2011-07-02 Thread Mike Belopuhov
On Sat, Jul 02, 2011 at 11:04 -0400, Ted Unangst wrote: On Mon, Jun 27, 2011, Henry Precheur wrote: According to pthread_key_create(3): Upon key creation, the value NULL is associated with the new key in all active threads. When pthread_key_create reuse an existing key, the old value

Re: Convert SO_RTABLE protocol level to SOL_SOCKET

2011-06-21 Thread Mike Belopuhov
On Mon, Jun 20, 2011 at 20:22 +0200, Claudio Jeker wrote: On Mon, Jun 20, 2011 at 06:30:11PM +0200, Mike Belopuhov wrote: Now that we support SO_RTABLE on the socket level, it makes sense to cleanup the tree. OK? The if (getsockopt() errno != ENOPROTOOPT) constructs are in my opinion

hibernate_machdep.c depends on acpi

2011-06-20 Thread Mike Belopuhov
hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi. a simple fix that establishes the dependency is below. ok? Index: arch/i386/conf/files.i386

Convert SO_RTABLE protocol level to SOL_SOCKET

2011-06-20 Thread Mike Belopuhov
Now that we support SO_RTABLE on the socket level, it makes sense to cleanup the tree. OK? Index: sbin/ping/ping.c === RCS file: /home/cvs/src/sbin/ping/ping.c,v retrieving revision 1.88 diff -u -p -r1.88 ping.c --- sbin/ping/ping.c

Re: hibernate_machdep.c depends on acpi

2011-06-20 Thread Mike Belopuhov
On Mon, Jun 20, 2011 at 13:22 +0200, Mark Kettenis wrote: Date: Mon, 20 Jun 2011 11:04:24 +0200 From: Mike Belopuhov m...@crypt.org.ru hi, the hibernate_machdep.c file depends on the acpi so it would be nice if we excluded this file if kernel config doesn't reference acpi

Re: AVL tree

2011-05-20 Thread Mike Belopuhov
On Fri, May 20, 2011 at 4:04 AM, Ariane van der Steldt ari...@stack.nl wrote: AVL trees have a difference of max 1 between the longest and shortest path to a leaf, whereas RB-trees have at max the longest path be double the length of the shortest path. I.e. work case lookups require traversal

Re: Panic in sr_crypto_rw with kern.bufcachepercent = 75

2011-05-20 Thread Mike Belopuhov
On Fri, May 20, 2011 at 06:24 -0600, David Coppa wrote: Hi all, OpenBSD-current snapshot dated 16-May-2011: I get an always-reproducible panic with softraid crypto and kern.bufcachepercent = 75, when untarring a tarball of the complete source tree. The disk layout is the following, with

Re: AVL tree

2011-05-19 Thread Mike Belopuhov
On Thu, May 19, 2011 at 7:12 PM, Thordur Bjornsson t...@openbsd.org wrote: On Thu, May 19, 2011 at 07:52:44PM +0300, Michael Pounov wrote: Add AVL tree implementation and merge few RB tree related macros. If you have comments or any claims, please send me feedback and I will fix them. cool.

Re: typo in icmp6(4)

2011-05-17 Thread Mike Belopuhov
On Mon, May 16, 2011 at 8:20 PM, Jason McIntyre j...@cava.myzen.co.uk wrote: what pf keyword addition? Andreas asked this question in the last sentence of his email: Is there a key word planned for this icmp6 code which could be used in PF?

Re: amd64 pmap diff to g/c ifdef _LP64

2011-05-16 Thread Mike Belopuhov
On Fri, Apr 08, 2011 at 18:27 -0400, Brad wrote: On Thu, Apr 07, 2011 at 09:00:45PM -0400, Brad wrote: Some _LP64 ifdef's leftover from rev 1.1. They appear to be unnecessary since this code is only for amd64 anyway and thus a 64-bit arch. Actually using the same if defined checks as

Re: typo in icmp6(4)

2011-05-16 Thread Mike Belopuhov
On Mon, May 16, 2011 at 6:45 PM, Jason McIntyre j...@cava.myzen.co.uk wrote: On Sun, May 08, 2011 at 08:27:31AM +0100, Jason McIntyre wrote: On Sat, May 07, 2011 at 09:29:21PM +0200, Andreas Bartelt wrote: Hello, I've noticed a typo in the icmp6(4) man page regarding icmp6 type 4 code 2.

Re: Typo in biovar.h?

2011-05-13 Thread Mike Belopuhov
On Fri, May 13, 2011 at 11:26 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: From: Vadim Zhukov persg...@gmail.com Date: Fri, 13 May 2011 13:10:10 +0400 Hello all. Looks like there is a typo in ioctl number... What makes you think this is a typo? there are two ioctls with the same

Re: Typo in biovar.h?

2011-05-13 Thread Mike Belopuhov
On Fri, May 13, 2011 at 11:50 AM, Otto Moerbeek o...@drijf.net wrote: On Fri, May 13, 2011 at 11:39:01AM +0200, Mike Belopuhov wrote: On Fri, May 13, 2011 at 11:26 AM, Mark Kettenis mark.kette...@xs4all.nl wrote: From: Vadim Zhukov persg...@gmail.com Date: Fri, 13 May 2011 13:10:10 +0400

limit number of tasks on the crypto queue

2011-05-03 Thread Mike Belopuhov
hi, recently me and jsg have figured out that a traffic burst can kill your interface (deplete the rx ring) if you're using ipsec. the problem is that there's no limit on number of outstanding crypto operations. every job contains a pointer to a cluster that comes from the nic driver. under

Re: pf(4) man page: include missing header in example program

2011-05-03 Thread Mike Belopuhov
On Tue, May 3, 2011 at 9:56 AM, Stuart Henderson s...@spacehopper.org wrote: On 2011/05/02 22:28, Lawrence Teo wrote: The DIOCNATLOOK example program at the end of the pf(4) man page uses memset(3), but string.h is not included. The following diff fixes this. Any thoughts? That change is

Re: limit number of tasks on the crypto queue

2011-05-03 Thread Mike Belopuhov
On Tue, May 3, 2011 at 9:24 PM, Claudio Jeker cje...@diehard.n-r-g.com wrote: On Tue, May 03, 2011 at 07:53:56PM +0200, Mike Belopuhov wrote: hi, recently me and jsg have figured out that a traffic burst can kill your interface (deplete the rx ring) if you're using ipsec. the problem

Re: make divert-to set original rdomain on accepted sockets

2011-04-12 Thread Mike Belopuhov
On Mon, Apr 11, 2011 at 19:52 +0200, Claudio Jeker wrote: On Mon, Apr 11, 2011 at 07:18:13PM +0200, Mike Belopuhov wrote: On Mon, Apr 11, 2011 at 18:51 +0200, Claudio Jeker wrote: On Mon, Apr 11, 2011 at 04:52:23PM +0200, Mike Belopuhov wrote: hi, currently there's no way

Re: ftp-proxy: use divert-to instead of rdr-to

2011-04-12 Thread Mike Belopuhov
On Mon, Apr 11, 2011 at 16:59 +0200, Mike Belopuhov wrote: On Thu, Apr 07, 2011 at 18:58 +0200, Mike Belopuhov wrote: this allows us to get rid of the nasty NATLOOKUP ioctl and get the original server address right from the socket. also this paves the way to the transparent ftp-proxy mode

make divert-to set original rdomain on accepted sockets

2011-04-11 Thread Mike Belopuhov
hi, currently there's no way to figure out what rdomain the diverted connection came from. this diff introduces a neat hack that reyk and i have invented. from the programmer's perspective this is as simple as calling getsockopt(SO_RTABLE) on the accepted socket. from the kernel perspective

Re: ftp-proxy: use divert-to instead of rdr-to

2011-04-11 Thread Mike Belopuhov
On Thu, Apr 07, 2011 at 18:58 +0200, Mike Belopuhov wrote: this allows us to get rid of the nasty NATLOOKUP ioctl and get the original server address right from the socket. also this paves the way to the transparent ftp-proxy mode. if you will like this diff and nobody objects, i'll try

Re: make divert-to set original rdomain on accepted sockets

2011-04-11 Thread Mike Belopuhov
On Mon, Apr 11, 2011 at 7:08 PM, Alexander Bluhm alexander.bl...@gmx.net wrote: On Mon, Apr 11, 2011 at 04:52:23PM +0200, Mike Belopuhov wrote: currently there's no way to figure out what rdomain the diverted connection came from. this diff introduces a neat hack that reyk and i have invented

Re: make divert-to set original rdomain on accepted sockets

2011-04-11 Thread Mike Belopuhov
On Mon, Apr 11, 2011 at 18:51 +0200, Claudio Jeker wrote: On Mon, Apr 11, 2011 at 04:52:23PM +0200, Mike Belopuhov wrote: hi, currently there's no way to figure out what rdomain the diverted connection came from. this diff introduces a neat hack that reyk and i have invented. from

Re: ftp-proxy: use divert-to instead of rdr-to

2011-04-08 Thread Mike Belopuhov
please disregard this diff. it's wrong. On Thu, Apr 7, 2011 at 6:58 PM, Mike Belopuhov m...@crypt.org.ru wrote: this allows us to get rid of the nasty NATLOOKUP ioctl and get the original server address right from the socket. also this paves the way to the transparent ftp-proxy mode. if you

ftp-proxy: use divert-to instead of rdr-to

2011-04-07 Thread Mike Belopuhov
this allows us to get rid of the nasty NATLOOKUP ioctl and get the original server address right from the socket. also this paves the way to the transparent ftp-proxy mode. if you will like this diff and nobody objects, i'll try to rip NATLOOKUP out from the other places too. note, that it

additional bpf mtap for carp

2011-03-31 Thread Mike Belopuhov
bpf is not called on multicast/broadcast packets arriving to the carp interface. this allows us to setup drop filters and allows tcpdump to show all the packets. OK/not-OK? Index: ip_carp.c === RCS file:

Re: use bswapq for swap64 on amd64

2011-03-12 Thread Mike Belopuhov
On Fri, Mar 11, 2011 at 14:45 -0800, Philip Guenther wrote: On Fri, 11 Mar 2011, Mike Belopuhov wrote: recent commit to pirofti made me wonder why don't we take an advantage of the 64 bit bswap instruction on amd64? Here's a revised diff with two changes from Mike's: 1) use %0 instead

use bswapq for swap64 on amd64

2011-03-11 Thread Mike Belopuhov
recent commit to pirofti made me wonder why don't we take an advantage of the 64 bit bswap instruction on amd64? Index: arch/amd64/include/endian.h === RCS file: /home/cvs/src/sys/arch/amd64/include/endian.h,v retrieving revision 1.3

Re: OpenBSD crash on an IBM x3550 M3

2011-03-03 Thread Mike Belopuhov
On Fri, Feb 04, 2011 at 14:53 +, emeric boit wrote: Hello, After doing a clean install of OpenBSD 4.8 (AMD64) on an IBM x3550 M3, I find the system randomly panics after a period of use. uvm_fault(0x80cc8360, 0x8000149b7000, 0, 1) - e kernel: page fault trap, code=0

Re: Dell R310 - H200 Raid performance problem

2011-03-02 Thread Mike Belopuhov
On Wed, Mar 2, 2011 at 11:54 AM, Okan Demirmen o...@demirmen.com wrote: I'm not certain this is wanted, but I said I would forward along this very simplisitc patch, so here it is. If something like this is wanted, it can be re-worked to take multiple args to -e and such, but again, only if

Re: properly name raid volumes on mpii

2011-02-24 Thread Mike Belopuhov
On Thu, Feb 24, 2011 at 11:42 +1000, David Gwynne wrote: you want to look up disks attached to an mpi by bus addressing, not which raid volume you happen to be up to. before this diff i got: dlg@hotspare dlg$ sudo bioctl mpii0 Volume Status Size Device mpii0 0 Online

SOCK_SEQPACKET is only valid for the AF_BLUETOOTH, SOCK_RDM is dead

2011-02-24 Thread Mike Belopuhov
Currenlty socket man page mentions long dead netns stack (PF_NS) when talks about SOCK_SEQPACKET which is only valid for AF_BLUETOOTH these days. Also it mentions SOCK_RDM that is an unused SysV compat goo. I think it make sense to update a reference for SOCK_SEQPACKET and don't mention SOCK_RDM

Re: ATI/AMD Radeon diff

2011-02-20 Thread Mike Belopuhov
On Sun, Feb 20, 2011 at 10:08 PM, Mark Kettenis mark.kette...@xs4all.nl wrote: And it turns out the xf86-video-ati driver has a bug very similar to the one in xf86-video-r128. This makes my XVR-100 restore the video mode a blade2k. this fixes the named problem for me on mac mini g4 with

pf doesn't rewrite source address for the icmp errors with rdr-to

2011-02-17 Thread Mike Belopuhov
in the simple setup, like the one described in the pr 6564, pf won't rewrite source address for the icmp errors (like destination unreachable) when doing rdr-to. this diff fixes issue for me and a pr originator. comments? do we want to put it into 4.9? Index: pf.c

Re: Dell R310 - H200 Raid performance problem

2011-02-17 Thread Mike Belopuhov
On Thu, Feb 10, 2011 at 14:25 +0100, Lukasz Czarniecki wrote: Hi I've bought a Dell R310 with H200 raid controller reported in dmesg as: Symbios Logic SAS2008. It uses mpii driver and has two hard drives configured in RAID 1. Now it seems to work fine but i still have a problem with its

Re: incorrect fallthrough in pf

2011-02-05 Thread Mike Belopuhov
On Sat, Feb 5, 2011 at 2:54 PM, Alexander Bluhm alexander.bl...@gmx.net wrote: On Sat, Feb 05, 2011 at 02:03:25PM +0100, Mike Belopuhov wrote: we can check if af == inet in icmp case obviously, but how and why can we end up with af == inet6 and an icmp payload (or af == inet and icmp6 payload

incorrect fallthrough in pf

2011-02-02 Thread Mike Belopuhov
hi, in pf_translate, when we're changing addresses for the icmp messages there's an unjustified fallthrough in the IPPROTO_ICMPV6 case. in fact this doesn't seem to harm anything because default case performs the same operation. note that pd-ip_sum is null in ipv6 case so pf_change_a6 just

Re: Fix alc(4) watchdog timeouts and panics

2011-01-31 Thread Mike Belopuhov
a network cable - watchdog timeouts Mike Belopuhov found another logic bug, updated diff follows. cf http://marc.info/?l=openbsd-techm=129639859909043w=2 -int alc_match(struct device *, void *, void *); +int alc_probe(struct device *, void *, void *); please don't rename functions like

Re: Fix alc(4) watchdog timeouts and panics

2011-01-31 Thread Mike Belopuhov
On Mon, Jan 31, 2011 at 1:35 PM, Brad b...@comstyle.com wrote: Also that second chunk of alc_newbuf from mikeb@ doesn't look right. There is a logic error with the way its written but it looks like it should be moved further down within the function. there's a call to the bus_dmamap_unload

Re: /bsd: splassert: assertwaitok: want -1 have 1

2011-01-20 Thread Mike Belopuhov
On Thu, Jan 20, 2011 at 10:31 +0200, Gregory Edigarov wrote: --- interrupt --- end trace frame: 0x0, count: 245 0x8: End of stack trace. pppoe0: received unexpected PADO pppoe0: chap failure pppoe: GENERIC ERROR: RP-PPPoE: Child pppd process terminated pppoe0: received unexpected PADO

Re: /bsd: splassert: assertwaitok: want -1 have 1

2011-01-20 Thread Mike Belopuhov
On Thu, Jan 20, 2011 at 1:57 PM, Joel Sing j...@sing.id.au wrote: pool_get() with PR_NOWAIT... and then not checking the return value? That's got null pointer dereference written all over it... :) However, the bigger problem is what can you then do if the pool_get() fails? This then results

<    4   5   6   7   8   9   10   >