Re: siphash for inode caches, or when you have a hammer everything looks like a nail

2014-11-17 Thread David Gwynne
On Tue, Nov 18, 2014 at 11:46:56AM +1000, David Gwynne wrote: On 18 Nov 2014, at 11:39, Ted Unangst t...@tedunangst.com wrote: On Tue, Nov 18, 2014 at 11:06, David Gwynne wrote: +#include dev/rndvar.h Sorry to interrupt :), but I think it's become clear that rndvar.h

Re: 64-bit PCI bridge support: testers needed

2014-11-20 Thread David Gwynne
working on a 2950. will put try it on a r710 soon. dlg On 20 Nov 2014, at 19:10, Mark Kettenis mark.kette...@xs4all.nl wrote: Hi All, dlg@ managed to get access to a machine that actually uses 64-bit PCI addresses behind a bridge. This triggered some bugs in the so far untested code.

Re: 64-bit PCI bridge support: testers needed

2014-11-20 Thread David Gwynne
works on an alpha es45 as well. theo made me do it. On 21 Nov 2014, at 13:49, David Gwynne da...@gwynne.id.au wrote: working on a 2950. will put try it on a r710 soon. dlg On 20 Nov 2014, at 19:10, Mark Kettenis mark.kette...@xs4all.nl wrote: Hi All, dlg@ managed to get access

Re: siphash in dirhash

2014-12-03 Thread David Gwynne
cool. reads and tests well for me. ok dlg@ On 3 Dec 2014, at 13:49, Ted Unangst t...@tedunangst.com wrote: Use now preferred SipHash24 functions. This also means we shouldn't need to hash in the value of the dirhash pointer itself, which confuses me every time I look at it. Index:

Re: Fix mfi to set drive state (offline, rebuild..) properly

2014-12-03 Thread David Gwynne
On 29 Nov 2014, at 12:20, YASUOKA Masahiko yasu...@yasuoka.net wrote: I'm using NEC Express5800 with its optional RAID contoller, but I could not set the drive state into rebuild or offline by bioctl(8). Tsubai found mfi(4) needs to be fixed to operate the firmware interface properly.

Re: Dell R630 high interrupts on acpi0

2014-12-15 Thread David Gwynne
On 16 Dec 2014, at 15:16, Jonathan Matthew jonat...@d14n.org wrote: On Sun, Dec 14, 2014 at 06:22:37PM +0100, Hrvoje Popovski wrote: Hi all, I have got two new Dell R630 and have current on them from Sun Dec 14 15:07:17. Installation went great and very fast. The problem is that I see

TIMEOUT_INITIALIZER

2014-12-21 Thread David Gwynne
i keep writing code that uses this, cos i was sure i added it years ago. turns out i havent. this is like TASK_INITIALIZER or the queue _INTIIALIZER macros. it lets you init a declaration of a timeout. ok? Index: sys/sys/timeout.h

idle pool page gc

2014-12-21 Thread David Gwynne
this introduces a global gc task that loops over all the pools looking for pages that havent been used for a very long time so they can be freed. this is the simplest way of doing this without introducing per pool timeouts/tasks which in turn could introduce races with pool_destroy, or more

Re: idle pool page gc

2014-12-22 Thread David Gwynne
On Mon, Dec 22, 2014 at 10:54:16AM -0500, Ted Unangst wrote: On Mon, Dec 22, 2014 at 14:59, Mike Belopuhov wrote: 1) how is it different from what we have now? 2) why can't you do it when you pool_put? Right now, if you allocate a bunch of things, then free them, the pages won't be

pool_allocator_nointr is a lie

2014-12-22 Thread David Gwynne
but we can build a truth on the lie. how about this? there's probably some fuzz with this diff cos i pulled it out of a bigger one. Index: sys/pool.h === RCS file: /cvs/src/sys/sys/pool.h,v retrieving revision 1.55 diff -u -p

simplify lm sensor alias removal

2014-12-31 Thread David Gwynne
i cant see why a task is necessary to defer the removal of iic sensors that alias isa ones we find. we should be able to remove the iic sensors directly. i also dont have a box with this hardware in it, so i cant test. anyone else willing to try? Index: lm78_isa.c

massage volume control task

2015-01-01 Thread David Gwynne
can someone test this? it allocates storage for the volume change details rather than cast arguments to a single global task. adds some safety while there if audio0 is a hotplug device. ok? Index: audio.c === RCS file:

Re: massage volume control task

2015-01-02 Thread David Gwynne
On 2 Jan 2015, at 9:55 pm, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Fri, 2 Jan 2015 16:15:07 +1000 From: David Gwynne da...@gwynne.id.au can someone test this? it allocates storage for the volume change details rather than cast arguments to a single global task. adds some

ral supports 802.11b, doesnt it?

2015-02-06 Thread David Gwynne
man -k ralink confused me for a sec ok? Index: ral.4 === RCS file: /cvs/src/share/man/man4/ral.4,v retrieving revision 1.106 diff -u -p -r1.106 ral.4 --- ral.4 15 Feb 2014 20:28:19 - 1.106 +++ ral.4 6 Feb 2015

Re: ral supports 802.11b, doesnt it?

2015-02-06 Thread David Gwynne
On 7 Feb 2015, at 6:49 am, Stuart Henderson st...@openbsd.org wrote: On 2015/02/07 06:41, David Gwynne wrote: man -k ralink confused me for a sec ok? Yes it does, but it isn't the only one, $ man -k a/b/g/n $ man -k a/g/n athn(4) - Atheros IEEE 802.11a/g/n wireless network device

Re: enable jumbos on newer re(4) devices

2015-01-21 Thread David Gwynne
On 21 Jan 2015, at 23:49, Brad Smith b...@comstyle.com wrote: On 01/21/15 06:51, Jim Smith wrote: hi all, the below diff enables support for jumbo frames on some newer re(4) devices. i've tested it on 8186D/8111D and 8186E/8111E chips, which are both able to do 9k jumbos. it seems to

Re: idle pool page gc

2015-01-18 Thread David Gwynne
On 23 Dec 2014, at 11:38, David Gwynne da...@gwynne.id.au wrote: On Mon, Dec 22, 2014 at 10:54:16AM -0500, Ted Unangst wrote: On Mon, Dec 22, 2014 at 14:59, Mike Belopuhov wrote: 1) how is it different from what we have now? 2) why can't you do it when you pool_put? Right now, if you

Re: explicit_bzero() in libc/hash Final functions

2015-01-14 Thread David Gwynne
On 15 Jan 2015, at 13:46, Todd C. Miller todd.mil...@courtesan.com wrote: We may want to add an explicit_bzero to SipHash_Final() too but I'll leave that up to tedu. the siphash implementation already uses explicit_bzero, but it is in SipHash_End. SipHash_Final is just a wrapper that

Re: enable jumbos on newer re(4) devices

2015-01-22 Thread David Gwynne
On 23 Jan 2015, at 06:52, Stuart Henderson st...@openbsd.org wrote: On 2015/01/22 10:09, David Gwynne wrote: On 21 Jan 2015, at 23:49, Brad Smith b...@comstyle.com wrote: On 01/21/15 06:51, Jim Smith wrote: hi all, the below diff enables support for jumbo frames on some newer re(4

Re: massage volume control task

2015-01-18 Thread David Gwynne
On 17 Jan 2015, at 11:06, Jim Smith j...@insec.sh wrote: On 2 Jan 2015, at 4:15 pm, David Gwynne da...@gwynne.id.au wrote: can someone test this? it allocates storage for the volume change details rather than cast arguments to a single global task. adds some safety while

Re: [patch] siphash static functions

2015-01-18 Thread David Gwynne
On 16 Jan 2015, at 20:45, Fritjof Bornebusch frit...@alokat.org wrote: Hi tech@, aren't these functions supposed to be static? no, static functions in the kernel means the debugger cant see their names, and we like seeing things in the debugger. they probably should be static in

re(4) reads the pci-e max packet size wrongly

2015-02-17 Thread David Gwynne
it looks like it reads the DCSR register and then keeps everything except the MPS field. this might cause it to erronously consider the mps to be much bigger than 2048, which in turn could prevent it from setting it correctly. i dont actually have one of these chips. can someone give it a spin?

Re: enable jumbos on newer re(4) devices

2015-02-20 Thread David Gwynne
On 20 Feb 2015, at 10:52 pm, Stuart Henderson st...@openbsd.org wrote: On 2015/02/18 11:57, Jim Smith wrote: On Fri, Jan 23, 2015 at 11:26:53AM +1000, David Gwynne wrote: a compromise could be to advertise checksum offload to the stack, pass it on to the hardware for small frames but have

Re: ftp less progress

2015-02-17 Thread David Gwynne
i like. ok by me fwiw. On 17 Feb 2015, at 6:07 pm, Ted Unangst t...@tedunangst.com wrote: It's sometimes helpful to run ftp -o - http://somwhat/ for debugging purposes, but the progress bar gets in the way and makes it ugly. Even with -V to disable verbose, it still prints progress. Add -M

Re: [PATCH] bpf is now blocking again with and without timeout

2015-01-24 Thread David Gwynne
On 21 Jan 2015, at 5:50 am, Simon Mages mages.si...@googlemail.com wrote: Sorry, i did not test the Patch well enough. It is still broken, but in a different way. I think tedu forgot in his patch to reset d-bd_rdStart. From my point of view it should be zero after sleeping in this

Re: amd64 softlock and interlocking

2015-01-23 Thread David Gwynne
Lots of other things would have to change when that happens too. Until then I'll take any latency improvement I can get. On 24 Jan 2015 12:40 am, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Fri, 23 Jan 2015 22:52:37 +1000 From: David Gwynne da...@gwynne.id.au when a softint gets

Re: state the 80 column knf rule in style(9)

2015-01-23 Thread David Gwynne
On 23 Jan 2015, at 9:37 pm, Stuart Henderson st...@openbsd.org wrote: On 2015/01/23 16:50, Jim Smith wrote: doesn't look like the 80 column rule is mentioned in style(9). this diff puts the sentence around the same place as osx's style(9) as it was the only example i could find and it

Re: massage volume control task

2015-01-11 Thread David Gwynne
On 3 Jan 2015, at 9:35 am, David Gwynne da...@gwynne.id.au wrote: On 2 Jan 2015, at 9:55 pm, Mark Kettenis mark.kette...@xs4all.nl wrote: Date: Fri, 2 Jan 2015 16:15:07 +1000 From: David Gwynne da...@gwynne.id.au can someone test this? it allocates storage for the volume change

make em(4) smarter at finding gcu0

2015-02-09 Thread David Gwynne
iterating over alldevs when we have device_lookup is silly. also, i want to protect alldevs in the future, so fumbling with it directly isnt the best. can someone with a gcu0 test this? Index: dev/pci/files.pci === RCS file:

Re: pf congestion handling

2015-02-10 Thread David Gwynne
On 11 Feb 2015, at 8:12 am, Alexander Bluhm alexander.bl...@gmx.net wrote: On Tue, Feb 10, 2015 at 04:01:19PM +1000, David Gwynne wrote: i want to remove the congestion stuff in ifqueue, but i dont want to remove the pf functionality. my attempt at this below. I like that you replaced

Re: sys/mbuf.h: tedu m_act

2015-02-09 Thread David Gwynne
On 9 Feb 2015, at 1:40 pm, Lawrence Teo l...@openbsd.org wrote: m_act was the historical name of m_nextpkt, and was already deprecated at the time DI of 4.4BSD was published. Nothing in our tree uses it, so I would like to propose removing it. Both FreeBSD and NetBSD have removed theirs.

pf congestion handling

2015-02-09 Thread David Gwynne
i started looking at locking on interface send queues (which use struct ifqueue) and got distracted cos the same data structure is used for the stack input queues. the stack input queues dont need the pri or hfsc queing bits, theyre just used as a fifo, so they can largely get directly replaced

Re: ARP mbuf queues

2015-03-21 Thread David Gwynne
On 19 Mar 2015, at 11:11 pm, Martin Pieuchot m...@openbsd.org wrote: When a host want to send packets to a destination whose Ethernet address that has not been resolved yet, it puts such packet on a mbuf queue. Right now this queue, linked to the corresponding ARP data structure, is hand

Re: ksh diff, escape !

2015-03-08 Thread David Gwynne
Your subject line sounded like the name of a Russ Meyer film. On 9 Mar 2015 5:56 am, Stuart Henderson st...@openbsd.org wrote: ! needs to be escaped in tab-completion otherwise this happens. $ ls Season 4 UPDATE!-FFdJhCSr8ng.mp4 $ ls Season\ 4\ UPDATE!-FFdJhCSr8ng.mp4 ls: Season 4 UPDATE!4:

Re: let vlan(4) mtu be limited by the parents hardmtu instead of current mtu

2015-03-28 Thread David Gwynne
On 20 Aug 2014, at 9:54 am, David Gwynne da...@gwynne.id.au wrote: this lets you have networks on the native vlan on an interface at 1500, while setting a child vlan interfaces mtu to jumbos. ok? how about now? i believe both ix and oce unconditionally set their mru now, and it's

Re: [patch]sudo: punctuation fixes

2015-02-26 Thread David Gwynne
i once tried to fix some of these messages a long time ago, but the diffs got rejected because the errors are considered classic in their current form and are now heritage protected. On 25 Feb 2015, at 9:49 pm, Fritjof Bornebusch frit...@alokat.org wrote: On Wed, Dec 24, 2014 at 01:48:44PM

Re: amd64 softlock and interlocking

2015-01-23 Thread David Gwynne
softints and interlocking, sorry. On 23 Jan 2015, at 10:52 pm, David Gwynne da...@gwynne.id.au wrote: when a softint gets scheduled, we set a bit in the current cpus cpu_info structure. that doesnt have to be an interlocked operation to be locally atomic. ok? Index: arch/amd64/amd64

amd64 softlock and interlocking

2015-01-23 Thread David Gwynne
when a softint gets scheduled, we set a bit in the current cpus cpu_info structure. that doesnt have to be an interlocked operation to be locally atomic. ok? Index: arch/amd64/amd64/intr.c === RCS file:

Re: r1.21 of sys/net/hfsc.c cripples networking speed

2015-04-24 Thread David Gwynne
On 24 Apr 2015, at 3:39 pm, Theo de Raadt dera...@cvs.openbsd.org wrote: After updating one of my machines to a more recent snapshot I noticed that networking speed was reduced and that the machine was 'less' responsive. Be aware there is a fairly expensive debugging diff in the snapshots

not all of uvm needs to see uvm_swap_encrypt.h

2015-05-04 Thread David Gwynne
uvm_meter.c needs it to route the sysctl, uvm_swap.c needs it to use the functionality, and uvm_swap_encrypt.c needs it to for obvious reasons. everything else doesnt and shouldnt care. ok? Index: uvm.h === RCS file:

sprinkle some symmetry on uvm_swap_encrypt

2015-05-04 Thread David Gwynne
SWAP_KEY_PUT calls swap_key_delete, while SWAP_KEY_GET inlines its work. this shuffles it so the work is in uvm_swap_encrypt.c, and lets us reduce the scope of some of the globals in uvm_swap_encrypt.c. ok? Index: uvm_swap_encrypt.c

interfaces and priorities for relayd routers

2015-05-14 Thread David Gwynne
i want relayd to check teh availability of some services and inject routes when the service is available. if it is available, i want to advertise the routes using ospfd, but i also want the local machine to be able to contact the service even if it isnt the carp master. to do that i need to

Re: Unix, Systat..., and Browser ERA

2015-05-13 Thread David Gwynne
On 14 May 2015, at 01:13, sven falempin sven.falem...@gmail.com wrote: Dear tech, tl;dr One can put a 80 columns tty into a javascript plugin and display 'listing' like formatted data on a Browser. This may be as fancy as a blink tag, taste is not something to argue. Nevertheless

Re: bce(4), lge(4), nge(4), vge(4), wb(4), malo(4) and hme(4/sparc)

2015-04-07 Thread David Gwynne
On 8 Apr 2015, at 01:38, Martin Pieuchot m...@openbsd.org wrote: Here's a diff to convert these drivers to if_input(). They all make use of m_devget(9) which takes an ifp as argument and I'd like to change that. But first I need to make sure all these drivers are converted. If you can

Re: add m_defrag to pcn driver

2015-04-07 Thread David Gwynne
On 8 Apr 2015, at 06:42, Stefan Fritsch s...@sfritsch.de wrote: Hi, I have committed the vio diff with some tweaks to remove some more now unused code. But I think this diff is actually incorrect: On Tue, 31 Mar 2015, Kimberley Manning wrote: Index: if_pcn.c

remove mbuf cluster pool watermarks

2015-04-07 Thread David Gwynne
they basically prevent the return of mbuf cluster memory back to uvm. this means if you have a spike of socket activity, you can end up allocating a lot of memory that you can never use again. the watermark was introduced to prevent clusters constantly churning back and forward with uvm. this

Re: bce(4), lge(4), nge(4), vge(4), wb(4), malo(4) and hme(4/sparc)

2015-04-08 Thread David Gwynne
On 8 Apr 2015, at 8:09 pm, Martin Pieuchot m...@openbsd.org wrote: On 08/04/15(Wed) 10:03, David Gwynne wrote: On 8 Apr 2015, at 01:38, Martin Pieuchot m...@openbsd.org wrote: Here's a diff to convert these drivers to if_input(). They all make use of m_devget(9) which takes an ifp

Re: RIP hzto(9) 4/4: manual pages

2015-06-09 Thread David Gwynne
On 10 Jun 2015, at 07:43, Mike Belopuhov m...@belopuhov.com wrote: OK? yep. diff --git share/man/man9/Makefile share/man/man9/Makefile index d145186..c63132f 100644 --- share/man/man9/Makefile +++ share/man/man9/Makefile @@ -12,11 +12,11 @@ MAN= aml_evalnode.9 atomic_add_int.9

Re: RIP hzto(9) 3/4: the implementation

2015-06-09 Thread David Gwynne
ok. On 10 Jun 2015, at 07:42, Mike Belopuhov m...@belopuhov.com wrote: OK? diff --git sys/kern/kern_clock.c sys/kern/kern_clock.c index 279804c..e35f2f4 100644 --- sys/kern/kern_clock.c +++ sys/kern/kern_clock.c @@ -200,63 +200,10 @@ hardclock(struct clockframe *frame) if

Re: RIP hzto(9) 2/4: NFS

2015-06-09 Thread David Gwynne
ok. On 10 Jun 2015, at 07:41, Mike Belopuhov m...@belopuhov.com wrote: OK? diff --git sys/nfs/nfs_socket.c sys/nfs/nfs_socket.c index 9edd615..a4a279f 100644 --- sys/nfs/nfs_socket.c +++ sys/nfs/nfs_socket.c @@ -1003,13 +1003,13 @@ tryagain: error =

Re: RIP hzto(9) 1/4: IPsec

2015-06-09 Thread David Gwynne
ok. On 10 Jun 2015, at 07:41, Mike Belopuhov m...@belopuhov.com wrote: OK? diff --git sys/net/if_bridge.c sys/net/if_bridge.c index 637dea8..ce8d0d7 100644 --- sys/net/if_bridge.c +++ sys/net/if_bridge.c @@ -2181,11 +2181,10 @@ int bridge_ipsec(struct bridge_softc *sc, struct ifnet

Re: interfaces and priorities for relayd routers

2015-06-24 Thread David Gwynne
On 24 Jun 2015, at 10:38 am, David Gwynne da...@gwynne.id.au wrote: On 22 Jun 2015, at 18:20, Reyk Floeter r...@openbsd.org wrote: Hi, On Thu, May 14, 2015 at 09:44:22PM +1000, David Gwynne wrote: i want relayd to check teh availability of some services and inject routes when

Re: interfaces and priorities for relayd routers

2015-06-23 Thread David Gwynne
On 22 Jun 2015, at 18:20, Reyk Floeter r...@openbsd.org wrote: Hi, On Thu, May 14, 2015 at 09:44:22PM +1000, David Gwynne wrote: i want relayd to check teh availability of some services and inject routes when the service is available. if it is available, i want to advertise the routes

unify vlan and svlan tag hashes

2015-07-01 Thread David Gwynne
tag lookups consider the type of interface as well as its tag, so it isnt necessary to have separate hashes for vlans and svlans. following on from this, i would like to widen the tag hash and maybe xor some more bits in to get the key. vlan tags are 12 bits, so the following appeals to me:

Re: [PATCH] tftpd, rdomain

2015-08-07 Thread David Gwynne
you cant get the same functionality with route exec? On 7 Aug 2015, at 2:26 am, Bertrand PROVOST provost.bertr...@gmail.com wrote: Hi, this diff add rdomain support to tftpd. It used setsockopt/SO_RTABLE like in ping program. Alternatively I could use `setrtable` once instead of

Re: get rid of em_realign()

2015-08-14 Thread David Gwynne
On 14 Aug 2015, at 02:44, Theo de Raadt dera...@cvs.openbsd.org wrote: Regarding other strict-alignment architectures, em(4) is probably one of the more popular gigabit ethernet options for those architectures that have PCI slots. I don't think any of these machines are severely memory

Re: Brainy: Use-After-Free in if_bnx

2015-07-23 Thread David Gwynne
hey maxime, this should be fixed in src/sys/dev/pci/if_bnx.c r1.112. thanks for the report :) dlg On 21 Jul 2015, at 18:31, Maxime Villard m...@m00nbsd.net wrote: Hi, I put here a bug among others: -- sys/dev/pci/if_bnx.c

ssh agent authentication for doas

2015-07-26 Thread David Gwynne
:20 2015 +++ ssh/doas.sshagent/doas.sshagent.c Sun Jul 26 14:16:33 2015 @@ -0,0 +1,136 @@ +/* $OpenBSD$ */ + +/* + * Copyright (c) 2015 David Gwynne d...@openbsd.org + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted

Re: ssh agent authentication for doas

2015-07-26 Thread David Gwynne
, you dont have a local agent socket to connect to in that situation. cheers, dlg On Sun, Jul 26, 2015 at 06:43:57PM +1000, David Gwynne wrote: this is rough, but enough to start a discussion. this lets doas authenticate a user by talking to their ssh agent by specifying 'ssh-agent

Re: ssh agent authentication for doas

2015-07-26 Thread David Gwynne
On 26 Jul 2015, at 7:41 pm, Vadim Zhukov persg...@gmail.com wrote: 2015-07-26 12:19 GMT+03:00 David Gwynne da...@gwynne.id.au: On 26 Jul 2015, at 7:07 pm, Nicholas Marriott nicholas.marri...@gmail.com wrote: Hi I can't say I know a lot about bsdauth so maybe this is a stupid

Re: ssh agent authentication for doas

2015-07-27 Thread David Gwynne
On 27 Jul 2015, at 1:57 am, Ted Unangst t...@tedunangst.com wrote: David Gwynne wrote: this is rough, but enough to start a discussion. this lets doas authenticate a user by talking to their ssh agent by specifying 'ssh-agent' on a permit line in the config. if agent auth fails, doas

Re: Ask for password for failed commands

2015-07-17 Thread David Gwynne
On 17 Jul 2015, at 16:18, Bob Beck b...@openbsd.org wrote: I concur. Vadim I like the basic idea, but I do not like that in the bogus case we still run all the priviledged user auth code. sudo also has the -l flag, which lists what commands you're allowed to run. however, it looks like if

Re: connect routing domains on layer 2

2015-10-22 Thread David Gwynne
> On 23 Oct 2015, at 09:00, Reyk Floeter wrote: > > Hi, > > this diff allows to interconnect routing domains. > > It is very useful to route traffic from one routing domain to another, > without using the pf "rtable" hack (tested in production for a long > time). > > eg., >

avoid IFQ_POLL in bge(4)

2015-11-11 Thread David Gwynne
basically check for space on the ring before dequeuing the packet. any errors we hit after that cause us to drop the mbuf. ok? Index: if_bge.c === RCS file: /cvs/src/sys/dev/pci/if_bge.c,v retrieving revision 1.371 diff -u -p

Re: sunfire v120 gem interfaces

2015-11-08 Thread David Gwynne
can you get the ifconfig output when its locked up? and a copy of what systat mb is showing? cheers, dlg > On 9 Nov 2015, at 09:36, Ryan Freeman wrote: > > Hey tech@, > > At my wits end here, I recently got a sunfire v120 from work for pretty cheap. > Quite excited to have

Re: Periodically sync RTC

2015-11-08 Thread David Gwynne
OK I don't care if there is better machinery or numbers, this is far better than the current situation. We lost power in a DC a few months back and we had machines come up with clocks off by values between 30 seconds and 45 minutes. On 9 Nov 2015 8:04 am, "Christian Weisgerber"

Re: sunfire v120 gem interfaces

2015-11-10 Thread David Gwynne
any joy? i mean, failure? > On 9 Nov 2015, at 10:40 AM, Ryan Freeman <r...@slipgate.org> wrote: > > On Mon, Nov 09, 2015 at 10:07:31AM +1000, David Gwynne wrote: >> can you get the ifconfig output when its locked up? and a copy of what >> systat mb is showing? >&g

shuffle vge(4) transmit

2015-11-11 Thread David Gwynne
i started this to make it avoid IFQ_POLL, but i threw some other changes in to make it easier. firstly, it checks if there's space on the ring before it proceeds to try and dequeue a packet for transmission. rather than advertise 32 dma segments in a transmit slots dma map, it advertises the 7

mpsafe ifqueues

2015-11-12 Thread David Gwynne
: share/man/man9/ifq_enq.9 diff -N share/man/man9/ifq_enq.9 --- /dev/null 1 Jan 1970 00:00:00 - +++ share/man/man9/ifq_enq.912 Nov 2015 05:50:12 - @@ -0,0 +1,140 @@ +.\" $OpenBSD$ +.\" +.\" Copyright (c) 2015 David Gwynne <d...@openbsd.org> +.\" +.\"

Re: sunfire v120 gem interfaces

2015-11-12 Thread David Gwynne
> On 13 Nov 2015, at 12:16, Ryan Freeman <r...@slipgate.org> wrote: > > On Tue, Nov 10, 2015 at 08:27:36PM +1000, David Gwynne wrote: >> any joy? i mean, failure? > > Well I got something different. I've noticed the failures only seem to happen > when my roomma

Re: em(4) watchdog timeouts

2015-11-15 Thread David Gwynne
On Fri, Nov 13, 2015 at 10:18:51AM -0500, Sonic wrote: > On Wed, Nov 11, 2015 at 9:20 AM, Gregor Best wrote: > > I've done some further testing and I think I've narrowed it down to the > > "Unlocking em(4) a bit further"-patch [0]. could you try this? its not written with the

Re: mpsafe ifqueues

2015-11-15 Thread David Gwynne
On Fri, Nov 13, 2015 at 12:22:31PM +1000, David Gwynne wrote: > this introduces mpsafety to ifqueue operations. > > this follows on from some mopping up of (now) inappropriate use of > ifqueues and the IF_ and IFQ_ operations on them. in most cases > those ifqueues hav

replace ppp(4) sc_npqueue+sc_npqtail with an mbuf_list

2015-11-02 Thread David Gwynne
while im shining this turd... ok? Index: if_ppp.c === RCS file: /cvs/src/sys/net/if_ppp.c,v retrieving revision 1.92 diff -u -p -r1.92 if_ppp.c --- if_ppp.c2 Nov 2015 23:39:20 - 1.92 +++ if_ppp.c3 Nov 2015 06:28:46

ml_purge for netinet/if_ether.c

2015-11-02 Thread David Gwynne
ml_purge returns how many mbufs they freed, so we can decrement the la_hold_total with that instead of inside an ml_dequeue/m_freem loop. ok? Index: netinet/if_ether.c === RCS file: /cvs/src/sys/netinet/if_ether.c,v retrieving

Re: toy zones for openbsd - an undergrad operating systems course assignment

2015-10-30 Thread David Gwynne
y, thanks a lot for this code. > > On Fri, Oct 30, 2015 at 4:17 AM, David Gwynne <da...@gwynne.id.au> wrote: >> ola, >> >> this semester ive had the fun of setting and marking the assignments >> for the operating systems course they teach at the university of >

Re: remove IF_PREPEND in src/sys/dev/pci, was Re: IFQ_PREPEND

2015-11-07 Thread David Gwynne
> On 6 Nov 2015, at 9:35 PM, David Gwynne <da...@gwynne.id.au> wrote: > > On Wed, Nov 04, 2015 at 08:18:48AM +0100, Martin Pieuchot wrote: >> On 04/11/15(Wed) 10:39, David Gwynne wrote: >>> im working on making the interface send queue mpsafe. >>>

Re: remove IF_PREPEND in src/sys/dev/pci, was Re: IFQ_PREPEND

2015-11-07 Thread David Gwynne
> On 8 Nov 2015, at 8:23 AM, Miod Vallat wrote: > >> noone has a vr? > > You can't expect people to use the crappiest Ethernet chip ever > designed. theyre in the alix, surely someone has those still. i thought le(4) was the worst.

wi(4) hostap vs if_enqueue

2015-11-03 Thread David Gwynne
if_wi_hostap.c basically inlines what if_enqueue does, but badly. more specifically, it uses IF_FOO operations to manipulate the interfaces send queue, but they only work if you're using priq. if you have hfsc on the interface it's not going to work well. this makes it just call if_enqueue. ok?

IFQ_PREPEND

2015-11-03 Thread David Gwynne
im working on making the interface send queue mpsafe. part of that involced deprecating the IFQ_POLL api because it allows the caller to get a reference an mbuf that is still on the send queue. this is dangerous if another cpu tries to manipulate the send queue. instead code should call

replace ifqueues in net80211 with mbuf_queus

2015-11-03 Thread David Gwynne
ive sent this to a couple of people before, but that was before i added mq_purge and ml_purge. it uses mbuf_queues in the net80211 stack instead of ifqueues. this means we shrink memory usage slightly, and get some locking. could someone give this a run on some wifi chips and see how it goes?

clean up ppp(4) "fastq"

2015-11-02 Thread David Gwynne
ppp(4) had code to prioritise IP packets with the low delay type of service set. maintaining this complicates refactoring the interface send queue, which im doing on the way to mpsafety for that side of the stack. id argue the functionality can be better implemented by using queues in pf. i

eou(4) - another operating systems course assignment

2015-11-05 Thread David Gwynne
ou.c === RCS file: net/if_eou.c diff -N net/if_eou.c --- /dev/null 1 Jan 1970 00:00:00 - +++ net/if_eou.c29 Oct 2015 23:14:32 - @@ -0,0 +1,781 @@ +/* $OpenBSD$ */ + +/* + * Copyright (c) 2009 Theo de Raadt + * Copyright (c) 2015 David Gwynne <d...@uq

Re: eou(4) - another operating systems course assignment

2015-11-05 Thread David Gwynne
> On 6 Nov 2015, at 15:42, David Gwynne <da...@gwynne.id.au> wrote: > > the last assignment i set for the operating systems course i was > helping with was to write a driver for a virtual network interface > that implemented the client side of a protocol i made up. > &g

remove IF_PREPEND in src/sys/dev/pci, was Re: IFQ_PREPEND

2015-11-06 Thread David Gwynne
On Wed, Nov 04, 2015 at 08:18:48AM +0100, Martin Pieuchot wrote: > On 04/11/15(Wed) 10:39, David Gwynne wrote: > > im working on making the interface send queue mpsafe. > > > > part of that involced deprecating the IFQ_POLL api because it allows the > > caller

Re: preparing pfi_kif to MP world

2015-10-13 Thread David Gwynne
> On 12 Oct 2015, at 12:00 AM, Alexandr Nedvedicky > wrote: > > Hello, > > patch below introduces struct refcnt to pfi_kif structure. Patch also changes > pfi_kif_get() function to always return a reference to pfi_kif instance. > > Furthermore existing

Re: preparing pfi_kif to MP world

2015-10-13 Thread David Gwynne
> On 13 Oct 2015, at 21:12, Mike Belopuhov <m...@belopuhov.com> wrote: > > On Tue, Oct 13, 2015 at 20:36 +1000, David Gwynne wrote: >> >>> On 12 Oct 2015, at 12:00 AM, Alexandr Nedvedicky >>> <alexandr.nedvedi...@oracle.com> wrote: >>> &g

myx_intr without a mutex for the sts block

2015-08-31 Thread David Gwynne
myx_intr should be able to run without a lock, except in teh situation where are bringing an interface down. this interlock was done by serialising the changes myx_down and myx_intr needed to do with a mutex, but for the many millions and billions of interrupts you get when you're actually

strtonum for grep

2015-08-25 Thread David Gwynne
if i pass 1filename as an argument to -A, -B, or -C, it's not out of range, it's not a number. this converts the arg processing to use strtonum so the errors are better. however, maybe the errors are standardised and this breaks compat with posix or something? Index: grep.c

mpsafe revarps

2015-09-13 Thread David Gwynne
this moves revarp processing to softnet because it is not mpsafe. it works fine for general use, but i would like someone to test it with diskless booting. ie, i want to know if nfs root works with this. ok? Index: net/if_ethersubr.c

mpsafe ip_carp

2015-09-13 Thread David Gwynne
i did this yesterday, but havent had a chance to beat on it properly yet. if anyone would like to give it a go it would be much appreciated. im particularly interested in stability while carp configuration is made or changed. if it happens to keep handling packets, thats great, but not blowing up

mpsafe vmx(4)

2015-09-14 Thread David Gwynne
this is an attempt to make the interrupt path in vmx mpsafe. seems to hold up under load here, but more testing would be appreciated. Index: if_vmx.c === RCS file: /cvs/src/sys/dev/pci/if_vmx.c,v retrieving revision 1.30 diff -u -p

reuse pf state ids to "hash" packets onto trunk members

2015-09-17 Thread David Gwynne
hashing bits of packet headers to tie connections to particular physical interfaces within a trunk turns out to be fairly expensive. in my very unscientific testing it is about 20% of the cost of udp traffic generated with tcpbench -u. we could tune or change the hash. eg, going from siphash 2 4

Re: gif(4) cleanup

2015-09-26 Thread David Gwynne
> On 25 Sep 2015, at 7:38 pm, Martin Pieuchot wrote: > > As discussed in Calgary I don't think we need 6 different files for > gif(4). None of them are standalone. Since all our other pseudo- > drivers are self-contained, let's do the same! This will prevent > new

sleep in interface detach until all refs are released

2015-09-26 Thread David Gwynne
this uses the refcnt api to do the heavy lifting. i think we have all the if_get/if_put calls we need, so this should be safe at this point. if anyone wants to test, can you try detaching or destroying interfaces and check that the ifconfig call that does it doesnt end up blocking forever? ok?

Re: reuse pf state ids to "hash" packets onto trunk members

2015-09-26 Thread David Gwynne
> On 18 Sep 2015, at 10:10 pm, Stuart Henderson <st...@openbsd.org> wrote: > > On 2015/09/18 13:36, Martin Pieuchot wrote: >> On 18/09/15(Fri) 15:55, David Gwynne wrote: >>> hashing bits of packet headers to tie connections to particular >>> physi

Re: mpsafe ip_carp

2015-09-18 Thread David Gwynne
> On 13 Sep 2015, at 6:34 pm, David Gwynne <da...@gwynne.id.au> wrote: > > i did this yesterday, but havent had a chance to beat on it properly > yet. > > if anyone would like to give it a go it would be much appreciated. > im particularly interested in stabili

Re: reuse pf state ids to "hash" packets onto trunk members

2015-09-18 Thread David Gwynne
> On 18 Sep 2015, at 6:17 pm, Stuart Henderson <s...@spacehopper.org> wrote: > > On 2015-09-18, David Gwynne <da...@gwynne.id.au> wrote: >> this lets pf embed the state id into the mbuf as a "flow id" so >> other subsystems can use it. eg, tr

Re: [PATCH] doas authentication type

2015-12-08 Thread David Gwynne
I would like this. It has my OK for what it is worth here. On 8 Dec 2015 11:41 am, "Stuart Henderson" wrote: > On 2015/11/25 00:14, Stuart Henderson wrote: > > On 2015/11/24 11:24, Richard Johnson wrote: > > > We use 2-factor authn for sudo & doas, as well as for most logins.

Re: taskctx and revisiting if_start serialisation

2015-12-07 Thread David Gwynne
> On 7 Dec 2015, at 11:34 PM, Martin Pieuchot <m...@openbsd.org> wrote: > > On 07/12/15(Mon) 19:37, David Gwynne wrote: >> On Sun, Dec 06, 2015 at 03:51:26PM +0100, Martin Pieuchot wrote: >>> On 06/12/15(Sun) 14:00, David Gwynne wrote: >>>> [...]

ifq serialisation, was Re: taskctx and revisiting if_start serialisation

2015-12-08 Thread David Gwynne
On Sun, Dec 06, 2015 at 02:00:16PM +1000, David Gwynne wrote: > the current code for serialising if_start calls for mpsafe nics does what it > says. as per mpi@s suggestion, this makes the ifq code responsible for the task serialisation. all the machinery is there, but it provides a m

<    1   2   3   4   5   6   7   8   9   10   >