timeout_barrier(9)

2017-11-16 Thread David Gwynne
this adds a timeout_barrier function, which works like all the other barriers we have (intr_barrier, ifq_barrier, etc). my use case for this is a network driver im working on, which uses a timeout to refill the rx ring if no mbufs are available in the system, but needs to wait for a timeout to

Re: add an iqdrops view to systat to show interface queue drops

2017-11-16 Thread David Gwynne
> On 17 Nov 2017, at 05:39, Claudio Jeker wrote: > > On Thu, Nov 16, 2017 at 03:21:20PM +0100, Alexander Bluhm wrote: >> On Wed, Nov 15, 2017 at 01:29:42PM +1000, David Gwynne wrote: >>> im adding numbers to input and output qdrops in the kernel, so im >>> aware that

Re: add an iqdrops view to systat to show interface queue drops

2017-11-16 Thread David Gwynne
On Thu, Nov 16, 2017 at 07:22:48AM -0700, Theo de Raadt wrote: > > Now ifstat and iqdrops show almost the same information. Just two > > commns are different, eight culumns are redundant. I think one > > page would be better. Do we need DESC? It takes a lot of space > > that could be used for

Re: mbuf statistics, tracking of drops

2017-11-16 Thread David Gwynne
On Thu, Nov 16, 2017 at 08:13:39PM +0100, Gregor Best wrote: > On Thu, Nov 16, 2017 at 11:13:04AM +1000, David Gwynne wrote: > > > > > On 16 Nov 2017, at 7:23 am, Gregor Best wrote: > > > > > > Hi, > > > > > > On Mon, Nov 13, 2017 at 01:47:01PM +1000, David Gwynne wrote: >

athn(4) USB open firmware support

2017-11-16 Thread Stefan Sperling
This diff switches athn(4) USB devices to open source firmware. I only have an AR9271 device which I can test with: athn0 at uhub1 port 2 configuration 1 interface 0 "ATHEROS USB2.0 WLAN" rev 2.00/1.08 addr 3 athn0: AR9271 rev 1 (1T1R), ROM rev 13, address xx:xx:xx:xx:xx:xx The diff switches

Tweak OF_getnodebyname()

2017-11-16 Thread Mark Kettenis
The current FDT implementation is fairly useless since it doesn't actually look at the child nodes. The macppc implementation walks the entire tree. But all current use cases of this function only look at children of the passed node. Diff below makes OF_getnodebyname() behave like that. ok?

Re: clang: Avoid EBX/RBX

2017-11-16 Thread Mark Kettenis
> Date: Wed, 15 Nov 2017 19:45:26 -0500 > From: Todd Mortimer > > Hi tech@, > > This is an updated diff that shuffles the allocation order for registers > on i386/amd64. The last one exposed a subtle bug with the way chromium > and libexecinfo interact when creating backtraces.

[PATCH] update struct vm_create_params

2017-11-16 Thread Carlos Cardenas
Add cdrom entry to vm_create_params in preparation for cdrom support in vmd. Ok? diff --git sys/arch/amd64/include/vmmvar.h sys/arch/amd64/include/vmmvar.h index 4847fa3defa..0e067f3f49d 100644 --- sys/arch/amd64/include/vmmvar.h +++ sys/arch/amd64/include/vmmvar.h @@ -26,6 +26,7 @@ #define

Re: add an iqdrops view to systat to show interface queue drops

2017-11-16 Thread Claudio Jeker
On Thu, Nov 16, 2017 at 03:21:20PM +0100, Alexander Bluhm wrote: > On Wed, Nov 15, 2017 at 01:29:42PM +1000, David Gwynne wrote: > > im adding numbers to input and output qdrops in the kernel, so im > > aware that they exist now. however, i don't really see these values > > in userland. it seems

Re: mbuf statistics, tracking of drops

2017-11-16 Thread Gregor Best
On Thu, Nov 16, 2017 at 11:13:04AM +1000, David Gwynne wrote: > > > On 16 Nov 2017, at 7:23 am, Gregor Best wrote: > > > > Hi, > > > > On Mon, Nov 13, 2017 at 01:47:01PM +1000, David Gwynne wrote: > >> [...] > >> pools maintain count of how many times they failed to provide

Re: ihidev(4) polling

2017-11-16 Thread joshua stein
On Thu, 16 Nov 2017 at 13:42:03 -0500, James Turner wrote: So I have to ask since when I hit you up on icb the above terms where all mentioned. With this diff and what you just committed to src add touchpad support to the Xiaomi Mi Air 12.5"? The Xiaomi Mi Air needs a Sunrise Point GPIO driver

Re: ihidev(4) polling

2017-11-16 Thread James Turner
On Thu, Nov 16, 2017 at 12:32:44PM -0600, joshua stein wrote: > Now that the dwiic(4) PCI support is in, this implements polling > mode for ihidev to work around the problem of ioapic interrupts not > arriving for them after setup. I've spent far too much time trying > to debug that problem

ihidev(4) polling

2017-11-16 Thread joshua stein
Now that the dwiic(4) PCI support is in, this implements polling mode for ihidev to work around the problem of ioapic interrupts not arriving for them after setup. I've spent far too much time trying to debug that problem (including much of my time at t2k17), so I made this as a workaround

Re: faster printf

2017-11-16 Thread Theo de Raadt
> Quick answer, more later: > > Theo de Raadt wrote on Thu, Nov 16, 2017 at 09:52:39AM -0700: > > Todd Miller wrote: > > >> Also, POSIX isn't explicit as to whether that restriction applies > >> to the format string or just the arguments to %lc and %ls conversions. > >> > >> What it does say

Re: faster printf

2017-11-16 Thread Ingo Schwarze
Hi Theo, Quick answer, more later: Theo de Raadt wrote on Thu, Nov 16, 2017 at 09:52:39AM -0700: > Todd Miller wrote: >> Also, POSIX isn't explicit as to whether that restriction applies >> to the format string or just the arguments to %lc and %ls conversions. >> >> What it does say is: >> >>

Re: faster printf

2017-11-16 Thread Todd C. Miller
On Thu, 16 Nov 2017 09:52:39 -0700, "Theo de Raadt" wrote: > > Also, POSIX isn't explicit as to whether that restriction applies > > to the format string or just the arguments to %lc and %ls conversions. > > > > What it does say is: > > > > The format is composed of zero or more directives:

Re: faster printf

2017-11-16 Thread Theo de Raadt
> Also, POSIX isn't explicit as to whether that restriction applies > to the format string or just the arguments to %lc and %ls conversions. > > What it does say is: > > The format is composed of zero or more directives: ordinary > characters, which are simply copied to the output

Re: dwiic: add pci attachment

2017-11-16 Thread Mark Kettenis
> Date: Sat, 11 Nov 2017 08:19:28 -0600 > From: joshua stein > > Here is a new version of the dwiic patch that restores the > acpi_attach_deps call, confirmed working by Cesare Gargano. > > Any other testers? One nit, see below. ok with that fixed > Index:

Re: faster printf

2017-11-16 Thread Todd C. Miller
On Thu, 16 Nov 2017 16:19:52 +0100, Stefan Sperling wrote: > I would expect EILSEQ during %lc and %ls conversions which explicitly > expect wide characters as arguments, but not for arbitrary data that > happens to be part of the format string. It is worth noting that this restriction is a POSIX

Re: faster printf

2017-11-16 Thread Stefan Sperling
On Thu, Nov 16, 2017 at 09:57:06AM -0500, Ted Unangst wrote: > Ingo Schwarze wrote: > > [EILSEQ] > > A wide-character code that does not correspond to a valid > > character has been detected. > > > > That means that the functions are *required* to fail ("shall fail") > > if

Re: faster printf

2017-11-16 Thread Ted Unangst
Ingo Schwarze wrote: > [EILSEQ] > A wide-character code that does not correspond to a valid > character has been detected. > > That means that the functions are *required* to fail ("shall fail") > if encoding errors can be detected, that -1 must be returned, and > that errno must

carp: address update hook gone after interface detach

2017-11-16 Thread Patrick Wildt
Hi, when we detach the interface from the carp the hook that is called when an address is updated is disestablished. But it never again gets re-established, which makes the carp interface unusable. This happens for instance if you run carp on trunk and destroy the trunk interface. This diff

Re: add an iqdrops view to systat to show interface queue drops

2017-11-16 Thread Theo de Raadt
> Now ifstat and iqdrops show almost the same information. Just two > commns are different, eight culumns are redundant. I think one > page would be better. Do we need DESC? It takes a lot of space > that could be used for output of dynamic counters. I use DESC every single day.

Re: add an iqdrops view to systat to show interface queue drops

2017-11-16 Thread Alexander Bluhm
On Wed, Nov 15, 2017 at 01:29:42PM +1000, David Gwynne wrote: > im adding numbers to input and output qdrops in the kernel, so im > aware that they exist now. however, i don't really see these values > in userland. it seems netstat and systat think errors are more > important. > > i tried adding

Re: netintro.4: sync struct ifreq with if.h

2017-11-16 Thread Sebastian Benoit
ok Theo Buehler(t...@theobuehler.org) on 2017.11.16 12:12:55 +0100: > ifr_vnetid is now a proper member of struct ifreq and is no longer > overloaded with ifr_metric. Moreover, ifr_index and ifr_llprio were > missing and mandoc -Tlint complained about a "useless macro: Tn". > > ok? > > Index:

Re: maximum size of http headers in relayd

2017-11-16 Thread Sebastian Benoit
Alexander Bluhm(alexander.bl...@gmx.net) on 2017.11.16 14:05:43 +0100: > On Wed, Nov 15, 2017 at 08:15:15PM +0100, Sebastian Benoit wrote: > > Thanks, here is a diff on top of the last to check that. > > > > If you manage to set the default headerlen on non http protocols, it does > > not catch

Re: maximum size of http headers in relayd

2017-11-16 Thread Alexander Bluhm
On Wed, Nov 15, 2017 at 08:15:15PM +0100, Sebastian Benoit wrote: > Thanks, here is a diff on top of the last to check that. > > If you manage to set the default headerlen on non http protocols, it does > not catch that, but i dont want to add another variable for that corner > case. I think it

netintro.4: sync struct ifreq with if.h

2017-11-16 Thread Theo Buehler
ifr_vnetid is now a proper member of struct ifreq and is no longer overloaded with ifr_metric. Moreover, ifr_index and ifr_llprio were missing and mandoc -Tlint complained about a "useless macro: Tn". ok? Index: share/man/man4/netintro.4