systat/pftop: PRIO field is gone and is not comming back

2017-04-28 Thread Mike Belopuhov
OK to remove an unused field? diff --git usr.bin/systat/pftop.c usr.bin/systat/pftop.c index 27120174a18..99447b586d7 100644 --- usr.bin/systat/pftop.c +++ usr.bin/systat/pftop.c @@ -148,11 +148,10 @@ field_def fields[] = { {"PEAK", 5, 8, 1, FLD_ALIGN_RIGHT, -1, 0, 0, 0},

Pf interface for FQ-CoDel

2017-04-28 Thread Mike Belopuhov
This is the last bit required in order to actually be able to use FQ-CoDel. It might require some polish, but I think there's nothing exceptionally ugly barring the statistics interface. fqcodel_stats is constructed to have a few fields "compatible" with the hfsc_class_stats so that byte and

Fix exponential glob

2017-04-28 Thread Ray Lai
As reported in https://research.swtch.com/glob, matching aaa with a*a*a*a*a*a*...etc takes exponential time. Tested with rsc's program: https://news.ycombinator.com/item?id=14187948 I copied the glob implementation from one of the BSDs - I believe FreeBSD - into a

Re: Fix exponential glob

2017-04-28 Thread Todd C. Miller
That patch seems to have gotten munged and there was a duplicate return statement. This one works for me. - todd Index: lib/libc/gen/glob.c === RCS file: /cvs/src/lib/libc/gen/glob.c,v retrieving revision 1.46 diff -u -p -u -r1.46

Re: Fix exponential glob

2017-04-28 Thread Todd C. Miller
On Fri, 28 Apr 2017 15:31:34 -0600, "Todd C. Miller" wrote: > Here's a diff that hews a bit more closely to the example code in > https://research.swtch.com/glob Ignore that diff for now, it is not correct. - todd

Re: Fix exponential glob

2017-04-28 Thread Todd C. Miller
Here's a diff that hews a bit more closely to the example code in https://research.swtch.com/glob - todd Index: lib/libc/gen/glob.c === RCS file: /cvs/src/lib/libc/gen/glob.c,v retrieving revision 1.46 diff -u -p -u -r1.46 glob.c

Re: Include packet timestamp into the mbuf packet header

2017-04-28 Thread Theo de Raadt
> One of the prerequisites for FQ_CoDel is ability to track packet > enqueue time. To avoid allocating per-packet mbuf tags, I'd prefer > to include the timestamp directly into the packet header structure. > This can be later used for other purposes as well if need be. OK? > > diff --git

Re: Include packet timestamp into the mbuf packet header

2017-04-28 Thread Mike Belopuhov
On Fri, Apr 28, 2017 at 07:54 -0600, Theo de Raadt wrote: > > One of the prerequisites for FQ_CoDel is ability to track packet > > enqueue time. To avoid allocating per-packet mbuf tags, I'd prefer > > to include the timestamp directly into the packet header structure. > > This can be later used

Re: syslogd error logging during startup

2017-04-28 Thread Sebastian Benoit
ok Alexander Bluhm(alexander.bl...@gmx.net) on 2017.04.28 02:17:23 +0200: > Hi, > > jung@ reported that syslogd's error messages are lost if it cannot > open a logfile. Problem is there is interfering logic during startup > whether to log to stderr or /dev/console. > > My log_setdebug()

Include packet timestamp into the mbuf packet header

2017-04-28 Thread Mike Belopuhov
One of the prerequisites for FQ_CoDel is ability to track packet enqueue time. To avoid allocating per-packet mbuf tags, I'd prefer to include the timestamp directly into the packet header structure. This can be later used for other purposes as well if need be. OK? diff --git sys/sys/mbuf.h

Provide pluggable queueing interface for Pf

2017-04-28 Thread Mike Belopuhov
By hiding H-FSC behind pfq_ops structure similar to the ifq_ops, we could provide alternative queueing interfaces for use in Pf. There are no other functional changes here except that the default H-FSC qlimit assignment happens in hfsc_class_create so there's no need to do it in the pf_ioctl

FQ-CoDel: Flow Queue - Controlled Delay

2017-04-28 Thread Mike Belopuhov
This is an implementation of an FQ-CoDel algorithm that relies on Pf for configuration and providing flow information via its stateful inspection. The purpose of FQ-CoDel is to provide fair sharing of bandwidth to simultaneous connections (flows in FQ-CoDel terminology) of different types in

Re: marco's plaintext history patch

2017-04-28 Thread Michael W. Bombardieri
On Fri, Apr 28, 2017 at 10:01:06AM +0200, Theo Buehler wrote: > This is an updated version of an old patch by marco [1], including some > improvements and fixes by natano and me. Here's marco's description: > > > I have had enough of corrupt ksh history so I had a look at the code to > > try to

marco's plaintext history patch

2017-04-28 Thread Theo Buehler
This is an updated version of an old patch by marco [1], including some improvements and fixes by natano and me. Here's marco's description: > I have had enough of corrupt ksh history so I had a look at the code to > try to fix it. The magical code was very magical so I basically deleted > most