Re: cloneable tun

2012-11-29 Thread Todd T. Fries
Penned by Reyk Floeter on 20121129 6:33.47, we have: | On Thu, Nov 29, 2012 at 10:59 AM, Mike Belopuhov wrote: | >> But currently /dev/tunN is usable from any programming language that | >> that can do reads and writes. With Reyk's changes you need to do an | >> ioc

Re: alt signal stack fixes

2012-11-29 Thread Philip Guenther
On Fri, Nov 16, 2012 at 11:45 AM, Philip Guenther wrote: > The diff below changes the alt sig stack logic to dynamically determine > whether the thread is currently on the alt stack, by comparing the stack > pointer against the altstack base and size, so that you get the correct > answer if you lo

Re: cloneable tun

2012-11-29 Thread Mark Kettenis
> Date: Thu, 29 Nov 2012 00:12:39 +0100 > From: Reyk Floeter > > On Wed, Nov 28, 2012 at 10:42 PM, Mark Kettenis > wrote: > > But currently /dev/tunN is usable from any programming language that > > that can do reads and writes. With Reyk's changes you need to do an > > ioctl even for basic us

Re: cloneable tun

2012-11-29 Thread Grumpy
> My favourite "quick-and-dirty" language is Python, and I consider > myself a fairly proficient Python programmer. I've never, ever, done > ioctls from Python, and while it looks indeed as if it is possible to > do so, I'm sure it'd take me some effort to get it right. I definitely agree with yo

Re: cloneable tun

2012-11-29 Thread Mark Kettenis
> Date: Thu, 29 Nov 2012 13:33:47 +0100 > From: Reyk Floeter > > btw., I like C and it is still my favorite language (sorry, CS > people). But it shouldn't be a problem to do simple ioctls with most > other languages except shell scripts. > > #!/usr/bin/perl > require "sys/ioctl.ph"; > $TUNSIFUN

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Mark Kettenis
> From: Mike Belopuhov > Date: Thu, 29 Nov 2012 21:41:28 +0100 > > On 29 November 2012 21:37, Claudio Jeker wrote: > > On Thu, Nov 29, 2012 at 09:21:49PM +0100, Mark Kettenis wrote: > >> > Date: Thu, 29 Nov 2012 20:49:00 +0100 > >> > From: Claudio Jeker > >> > > >> > On Thu, Nov 29, 2012 at 11:

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Brad Smith
On Thu, Nov 29, 2012 at 09:37:53PM +0100, Mike Belopuhov wrote: > On 29 November 2012 21:21, Mark Kettenis wrote: > >> Date: Thu, 29 Nov 2012 20:49:00 +0100 > >> From: Claudio Jeker > >> > >> On Thu, Nov 29, 2012 at 11:50:09AM -0500, Kenneth R Westerback wrote: > >> > On Thu, Nov 29, 2012 at 04:4

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Mike Belopuhov
On 29 November 2012 21:37, Claudio Jeker wrote: > On Thu, Nov 29, 2012 at 09:21:49PM +0100, Mark Kettenis wrote: >> > Date: Thu, 29 Nov 2012 20:49:00 +0100 >> > From: Claudio Jeker >> > >> > On Thu, Nov 29, 2012 at 11:50:09AM -0500, Kenneth R Westerback wrote: >> > > On Thu, Nov 29, 2012 at 04:41

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Mike Belopuhov
On 29 November 2012 21:21, Mark Kettenis wrote: >> Date: Thu, 29 Nov 2012 20:49:00 +0100 >> From: Claudio Jeker >> >> On Thu, Nov 29, 2012 at 11:50:09AM -0500, Kenneth R Westerback wrote: >> > On Thu, Nov 29, 2012 at 04:41:09PM +0100, Mike Belopuhov wrote: >> > > hi, >> > > >> > > drivers ex age

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Claudio Jeker
On Thu, Nov 29, 2012 at 09:21:49PM +0100, Mark Kettenis wrote: > > Date: Thu, 29 Nov 2012 20:49:00 +0100 > > From: Claudio Jeker > > > > On Thu, Nov 29, 2012 at 11:50:09AM -0500, Kenneth R Westerback wrote: > > > On Thu, Nov 29, 2012 at 04:41:09PM +0100, Mike Belopuhov wrote: > > > > hi, > > > >

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Mark Kettenis
> Date: Thu, 29 Nov 2012 20:49:00 +0100 > From: Claudio Jeker > > On Thu, Nov 29, 2012 at 11:50:09AM -0500, Kenneth R Westerback wrote: > > On Thu, Nov 29, 2012 at 04:41:09PM +0100, Mike Belopuhov wrote: > > > hi, > > > > > > drivers ex age alc ale jme se vic vte xe upl and octeon/cmac > > > mak

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Claudio Jeker
On Thu, Nov 29, 2012 at 09:10:58PM +0100, Mike Belopuhov wrote: > On 29 November 2012 20:49, Claudio Jeker wrote: > > On Thu, Nov 29, 2012 at 11:50:09AM -0500, Kenneth R Westerback wrote: > >> On Thu, Nov 29, 2012 at 04:41:09PM +0100, Mike Belopuhov wrote: > >> > hi, > >> > > >> > drivers ex age a

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Mike Belopuhov
On 29 November 2012 20:49, Claudio Jeker wrote: > On Thu, Nov 29, 2012 at 11:50:09AM -0500, Kenneth R Westerback wrote: >> On Thu, Nov 29, 2012 at 04:41:09PM +0100, Mike Belopuhov wrote: >> > hi, >> > >> > drivers ex age alc ale jme se vic vte xe upl and octeon/cmac >> > make use of the if_iqdrops

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Claudio Jeker
On Thu, Nov 29, 2012 at 11:50:09AM -0500, Kenneth R Westerback wrote: > On Thu, Nov 29, 2012 at 04:41:09PM +0100, Mike Belopuhov wrote: > > hi, > > > > drivers ex age alc ale jme se vic vte xe upl and octeon/cmac > > make use of the if_iqdrops counter that is not shown by any of our > > tools (lik

tiny fstat(1) output formatting nit

2012-11-29 Thread Mike Belopuhov
makes cloned devices line up well with the rest of the output: _dhcpdhclient 30880 text / 14 -r-xr-xr-x r 283856 _dhcpdhclient 30880 wd /var77953 drwxr-xr-x r 512 _dhcpdhclient 30880 root /var77953 drwxr-xr-x r 512 _dhcpdhclien

Re: change if_iqdrops to if_ierrors

2012-11-29 Thread Kenneth R Westerback
On Thu, Nov 29, 2012 at 04:41:09PM +0100, Mike Belopuhov wrote: > hi, > > drivers ex age alc ale jme se vic vte xe upl and octeon/cmac > make use of the if_iqdrops counter that is not shown by any of our > tools (like netstat). looks like most of its usage comes from > freebsd where they show it

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

2012-11-29 Thread Henning Brauer
* Reyk Floeter [2012-11-29 15:31]: > On Thu, Nov 29, 2012 at 3:12 PM, Mike Belopuhov wrote: > > Please note that pfctl/altq has a bug where bandwidth specification > > expressed in percentage gets converted to the absolute value when > > pfctl is run. And since for some NICs in some setups it mi

change if_iqdrops to if_ierrors

2012-11-29 Thread Mike Belopuhov
hi, drivers ex age alc ale jme se vic vte xe upl and octeon/cmac make use of the if_iqdrops counter that is not shown by any of our tools (like netstat). looks like most of its usage comes from freebsd where they show it in the "netstat -di" output in a new column. do we want to do that or just

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

2012-11-29 Thread Reyk Floeter
On Thu, Nov 29, 2012 at 3:12 PM, Mike Belopuhov wrote: >> OK? >> > > Please note that pfctl/altq has a bug where bandwidth specification > expressed in percentage gets converted to the absolute value when > pfctl is run. And since for some NICs in some setups it might take > some time to acquire

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

2012-11-29 Thread Mike Belopuhov
On Wed, Nov 28, 2012 at 2:25 AM, Brad Smith wrote: > On Sat, Nov 24, 2012 at 10:24:00PM -0500, Brad Smith wrote: >> On Fri, Nov 23, 2012 at 11:57:50AM -0200, Gleydson Soares wrote: >> > set ifp->if_baudrate with IF_Gbps() / IF_Mbps(). >> > >> > OK ? >> >> Although it has already been commited its

Re: X540T: link is not detected

2012-11-29 Thread Mike Belopuhov
On Tue, Nov 27, 2012 at 2:28 PM, mxb wrote: > There is however, no problem then: > > plugged -> boot -> wait -> unplug -> wait -> plug in. > > On 27 nov 2012, at 13:50, mxb wrote: > >> >> Hi tech@, >> >> ix(4) does not detects link then cable is plugged in into already running >> machine. >> >>

Re: X540T: link is not detected

2012-11-29 Thread Mike Belopuhov
On Wed, Nov 28, 2012 at 12:38 PM, mxb wrote: > Compiling if_ix.c with IX_DEBUG yields > > ../../../../dev/pci/if_ix.c: In function 'ixgbe_print_hw_stats': > ../../../../dev/pci/if_ix.c:3525: error: 'struct ix_softc' has no member named > 'mbuf_alloc_failed' > ../../../../dev/pci/if_ix.c:3526: erro

Re: cloneable tun

2012-11-29 Thread Gerhard Roth
On 11/29/2012 01:33 PM, Reyk Floeter wrote: > On Thu, Nov 29, 2012 at 10:59 AM, Mike Belopuhov wrote: >>> But currently /dev/tunN is usable from any programming language that >>> that can do reads and writes. With Reyk's changes you need to do an >>> ioctl even for basic usage, which is at best q

Re: cloneable tun

2012-11-29 Thread Marc Espie
On Thu, Nov 29, 2012 at 01:33:47PM +0100, Reyk Floeter wrote: > On Thu, Nov 29, 2012 at 10:59 AM, Mike Belopuhov wrote: > >> But currently /dev/tunN is usable from any programming language that > >> that can do reads and writes. With Reyk's changes you need to do an > >> ioctl even for basic usag

Re: cloneable tun

2012-11-29 Thread Reyk Floeter
On Thu, Nov 29, 2012 at 10:59 AM, Mike Belopuhov wrote: >> But currently /dev/tunN is usable from any programming language that >> that can do reads and writes. With Reyk's changes you need to do an >> ioctl even for basic usage, which is at best quirky in languages other >> than C/C++. That fee

Re: cloneable tun

2012-11-29 Thread Stuart Henderson
On 2012/11/28 22:21, Mike Belopuhov wrote: > >> Drawback: This diff would require to patch all the existing users of > >> /dev/tun* in ports and the tree to add the TUNSIFUNIT ioctl. The > >> benefit is that you don't have to MAKEDEV all the tuns anymore and can > >> open up to around 1024 active

Fix MacBook Air 2010 speakers

2012-11-29 Thread Ray Lai
Adapted from http://marc.info/?l=openbsd-misc&m=128919130029011&w=2 OK? Index: dev/pci/azalia_codec.c === RCS file: /home/cvs/src/sys/dev/pci/azalia_codec.c,v retrieving revision 1.151 diff -u -p -r1.151 azalia_codec.c --- dev/pci/

Re: cloneable tun

2012-11-29 Thread Mike Belopuhov
On Wed, Nov 28, 2012 at 10:42 PM, Mark Kettenis wrote: >> From: Mike Belopuhov >> Date: Wed, 28 Nov 2012 22:21:07 +0100 >> >> On Wed, Nov 28, 2012 at 8:21 PM, Mark Kettenis >> wrote: >> >> Date: Wed, 28 Nov 2012 17:39:24 +0100 >> >> From: Reyk Floeter >> >> >> >> Hi, >> >> >> >> inspired by mi