Re: pipex(4): use reference counters for `ifnet'

2020-06-26 Thread Martin Pieuchot
On 25/06/20(Thu) 19:56, Vitaliy Makkoveev wrote: > Updated diff. > > OpenBSD uses 16 bit counter for allocate interface indexes. So we can't > store index in session and be sure if_get(9) returned `ifnet' is our > original `ifnet'. Why not? The point of if_get(9) is to be sure. If that

Re: [PATCH] fast conditional console scrolling

2020-06-26 Thread Paul de Weerd
Hi John, I tried your diff. I don't quite see the same 3x improvement that you report, more like 2x. I timed 7 runs of ls -R /usr/ports: Before diff, time ls -R /usr/ports | wc -l 2.897s on average After diff, time ls -R /usr/ports | wc -l 2.707s on average Before diff, time ls -R

Re: Destructive Install Process (fdisk)

2020-06-26 Thread Kevin Chadwick
On 2020-06-25 20:16, Theo de Raadt wrote: > I'd say that I simply don't see why the installer destructively > re-arranges the disk's scheme prior to officially choosing to write > the new partitioning scheme to the disk. I'm not sure that I believe that and it shows you what YOU are about to

11n Tx aggregation for iwm(4)

2020-06-26 Thread Stefan Sperling
This patch adds support for 11n Tx aggregation to iwm(4). Please help with testing if you can by running the patch and using wifi as usual. Nothing should change, except that Tx speed may potentially improve. If you have time to run before/after performance measurements with tcpbench or such,

Re: Destructive Install Process (fdisk)

2020-06-26 Thread Damien Couderc
Le 25/06/2020 à 22:41, David Blevins a écrit : List, Apologies, I left HTML mode enabled on my web client. I understand that a Linux dmesg is probably not very useful. I can provide a different set of system information (or an OpenBSD dmesg from an MBR boot) but I'm not sure what set of

Re: Destructive Install Process (fdisk)

2020-06-26 Thread David Blevins
OpenBSD Community, Thanks for the feedback, some people that write the multiboot instructions reached out to me and I'm working through them. >In order to use GPT you need a BIOS that supports it. In most of the >cases, this means an UEFI BIOS. I'm aware of the issues related to UEFI

Re: pipex(4): use reference counters for `ifnet'

2020-06-26 Thread Martin Pieuchot
On 26/06/20(Fri) 12:35, Vitaliy Makkoveev wrote: > On Fri, Jun 26, 2020 at 10:23:42AM +0200, Martin Pieuchot wrote: > > On 25/06/20(Thu) 19:56, Vitaliy Makkoveev wrote: > > > Updated diff. > > > > > > OpenBSD uses 16 bit counter for allocate interface indexes. So we can't > > > store index in

Re: make btrace interval event to reciprocal of ticks

2020-06-26 Thread Martin Pieuchot
On 25/06/20(Thu) 23:45, Yuichiro NAITO wrote: > From: Martin Pieuchot > Subject: Re: make btrace interval event to reciprocal of ticks > Date: Thu, 25 Jun 2020 11:36:48 +0200 > > > On 23/06/20(Tue) 12:04, Yuichiro NAITO wrote: > >> Current btrace has `interval:hz:1` probe that makes periodically

update vxlan(4) man

2020-06-26 Thread Denis Fondras
vxlan(4) actually supports IPv6 tunnel endpoints. Only multicast endpoints are unsupported. Index: vxlan.4 === RCS file: /cvs/src/share/man/man4/vxlan.4,v retrieving revision 1.8 diff -u -p -r1.8 vxlan.4 --- vxlan.4 22 Nov 2018

Re: powerpc64: 64-bit-ize memmove.S

2020-06-26 Thread Christian Weisgerber
Christian Weisgerber: > Well, I suggested it, so here's my attempt to switch powerpc64's > libc memmove.S over to 64 bits: Actually, on second thought: That function simply copies as many (double)words plus a tail of bytes as the length argument specifies. Neither source nor destination are

Re: powerpc64: 64-bit-ize memmove.S

2020-06-26 Thread Theo de Raadt
George Koehler wrote: > On Sat, 27 Jun 2020 01:27:14 +0200 > Christian Weisgerber wrote: > > > I'm also intrigued by this aside in the PowerPC ISA documentation: > > | Moreover, Load with Update instructions may take longer to execute > > | in some implementations than the corresponding pair

Re: 11n Tx aggregation for iwm(4)

2020-06-26 Thread Mike Larkin
On Fri, Jun 26, 2020 at 09:01:03PM -0700, Mike Larkin wrote: > On Fri, Jun 26, 2020 at 02:45:53PM +0200, Stefan Sperling wrote: > > This patch adds support for 11n Tx aggregation to iwm(4). > > > > Please help with testing if you can by running the patch and using wifi > > as usual. Nothing should

Re: 11n Tx aggregation for iwm(4)

2020-06-26 Thread Johan Huldtgren
hello, On 2020-06-26 14:45, Stefan Sperling wrote: > It would be great to get at least one test for all the chipsets the driver > supports: 7260, 7265, 3160, 3165, 3168, 8260, 8265, 9260, 9560 > The behaviour of the access point also matters a great deal. It won't > hurt to test the same chipset

powerpc64: 64-bit-ize memmove.S

2020-06-26 Thread Christian Weisgerber
Well, I suggested it, so here's my attempt to switch powerpc64's libc memmove.S over to 64 bits: * Treat length parameter as 64 bits (size_t) instead of 32 (u_int). * Set up the main loop to copy 64-bit doublewords instead of 32-bit words. This definitely needs double and triple checking.

Re: top: add missing scroll keys to help page, name default signal

2020-06-26 Thread Todd C . Miller
On Fri, 26 Jun 2020 23:39:25 +0200, Klemens Nanni wrote: > The order of commands is not in sync between help page and manual, but > I refrained from reordering to avoid churn. OK millert@ - todd

Re: powerpc64: 64-bit-ize memmove.S

2020-06-26 Thread George Koehler
On Sat, 27 Jun 2020 01:27:14 +0200 Christian Weisgerber wrote: > I'm also intrigued by this aside in the PowerPC ISA documentation: > | Moreover, Load with Update instructions may take longer to execute > | in some implementations than the corresponding pair of a non-update > | Load instruction

Re: fix races in if_clone_create()

2020-06-26 Thread Vitaliy Makkoveev
On Fri, Jun 26, 2020 at 09:12:16PM +0200, Martin Pieuchot wrote: > On 26/06/20(Fri) 16:56, Vitaliy Makkoveev wrote: > > if_clone_create() has the races caused by context switch. > > Can you share a backtrace of such race? Where does the kernel panic? > This diff was inspired by thread [1]. As I

Re: 11n Tx aggregation for iwm(4)

2020-06-26 Thread Mike Larkin
On Fri, Jun 26, 2020 at 02:45:53PM +0200, Stefan Sperling wrote: > This patch adds support for 11n Tx aggregation to iwm(4). > > Please help with testing if you can by running the patch and using wifi > as usual. Nothing should change, except that Tx speed may potentially > improve. If you have

Re: awk FS behaviour change

2020-06-26 Thread Jason McIntyre
On Fri, Jun 26, 2020 at 09:28:00PM -0600, Todd C. Miller wrote: > On Fri, 26 Jun 2020 23:56:23 +0200, Klemens Nanni wrote: > > > How about adding something like "Therefore, FS should be set with -F or > > in a BEGIN block before input is read." as second sentence in this > > paragraph? > > That

Re: awk FS behaviour change

2020-06-26 Thread Todd C . Miller
On Fri, 26 Jun 2020 23:56:23 +0200, Klemens Nanni wrote: > How about adding something like "Therefore, FS should be set with -F or > in a BEGIN block before input is read." as second sentence in this > paragraph? That whole section is missing important details. I've tried to add the missing

Re: top: remove duplicate initialisation

2020-06-26 Thread Vitaliy Makkoveev
> On 26 Jun 2020, at 22:00, Klemens Nanni wrote: > > Those are global variables are (zero) initialised as such already and > machine_init() is called only once upon startup. > > Feedback? OK? > > > Index: machine.c > === > RCS

Re: top: remove duplicate initialisation

2020-06-26 Thread Vitaliy Makkoveev
> On 26 Jun 2020, at 23:12, Klemens Nanni wrote: > > On Fri, Jun 26, 2020 at 11:07:54PM +0300, Vitaliy Makkoveev wrote: >> What about “pageshift = 0;” at usr.bin/top/machine.c:216 ? > Could be removed as well but I left it in there intentionally to keep > this block of code readable since

Re: pipex(4): use reference counters for `ifnet'

2020-06-26 Thread Vitaliy Makkoveev
On Fri, Jun 26, 2020 at 09:15:38PM +0200, Martin Pieuchot wrote: > On 26/06/20(Fri) 17:53, Vitaliy Makkoveev wrote: > > On Fri, Jun 26, 2020 at 02:29:03PM +0200, Martin Pieuchot wrote: > > > On 26/06/20(Fri) 12:35, Vitaliy Makkoveev wrote: > > > > On Fri, Jun 26, 2020 at 10:23:42AM +0200, Martin

Re: Stuck in Needbuf state, trying to understand (6.7)

2020-06-26 Thread sven falempin
On Fri, Jun 26, 2020 at 5:22 PM Stuart Henderson wrote: > On 2020/06/26 15:30, sven falempin wrote: > > behavior confirmed on current. > > > > Once the process stalls, ( could be anything writing to the vnconfig > disk, > > cp , umount ) > > a few other calls like df , or ps, etc may hang,

wg(4): encapsulated transport checksums

2020-06-26 Thread richard . n . procter
Hi, On its receive path, wg(4) uses the same mbuf for both the encrypted capsule and its encapsulated packet, which it passes up to the stack. We must therefore clear this mbuf's checksum status flags, as although the capsule may have been subject to hardware offload, its encapsulated packet

top: remove duplicate initialisation

2020-06-26 Thread Klemens Nanni
Those are global variables are (zero) initialised as such already and machine_init() is called only once upon startup. Feedback? OK? Index: machine.c === RCS file: /cvs/src/usr.bin/top/machine.c,v retrieving revision 1.105 diff -u

Re: top: remove duplicate initialisation

2020-06-26 Thread Klemens Nanni
On Fri, Jun 26, 2020 at 11:07:54PM +0300, Vitaliy Makkoveev wrote: > What about “pageshift = 0;” at usr.bin/top/machine.c:216 ? Could be removed as well but I left it in there intentionally to keep this block of code readable since pageshift is not only set but used immediately afterwards as well.

Re: pkg_add.1

2020-06-26 Thread Marc Espie
On Wed, Jun 24, 2020 at 05:32:57PM +0100, Jason McIntyre wrote: > On Tue, Jun 23, 2020 at 07:28:09PM -0400, sven falempin wrote: > > Dear readers, > > > > It may not be very obvious that 'dry run' mode of pkg_add > > actually downloads packages. > > It is a good feature and maybe the pkg_add man

Re: awk FS behaviour change

2020-06-26 Thread Todd C . Miller
On Fri, 26 Jun 2020 21:41:57 +0100, Stuart Henderson wrote: > I don't know which is "correct" (the manpage isn't enlightening) but > it was a bit unexpected so I wanted to at least draw attention to it > in case it breaks somebody else's script. The awk manual leaves a lot of things unspecified

fix races in if_clone_create()

2020-06-26 Thread Vitaliy Makkoveev
if_clone_create() has the races caused by context switch. cut begin if_clone_create(const char *name, int rdomain) { struct if_clone *ifc; struct ifnet *ifp; int unit, ret; ifc = if_clone_lookup(name, ); /* [1] */ if (ifc == NULL)

Re: awk FS behaviour change

2020-06-26 Thread Todd C . Miller
On Fri, 26 Jun 2020 21:41:57 +0100, Stuart Henderson wrote: > The Sep 10, 2019 version of awk introduced a change in handling this: > > ifconfig egress | awk '/inet / {FS="[ .]"; print "host-"$4"-"$5"}' > > Given a line like > > inet 10.20.30.40 netmask 0xff00 broadcast 10.20.30.255

Re: pipex(4): use reference counters for `ifnet'

2020-06-26 Thread Martin Pieuchot
On 26/06/20(Fri) 17:53, Vitaliy Makkoveev wrote: > On Fri, Jun 26, 2020 at 02:29:03PM +0200, Martin Pieuchot wrote: > > On 26/06/20(Fri) 12:35, Vitaliy Makkoveev wrote: > > > On Fri, Jun 26, 2020 at 10:23:42AM +0200, Martin Pieuchot wrote: > > > > On 25/06/20(Thu) 19:56, Vitaliy Makkoveev wrote: >

Re: paste: treat '\0' delim as empty string

2020-06-26 Thread Richard Ipsum
On Mon, May 11, 2020 at 07:35:43AM +0200, Richard Ipsum wrote: > Hi, > > This patch makes paste treat '\0' in the delim list as an empty string > instead of a null character as per POSIX[1]. > > before: > > % echo -e 'hello\nworld' | ./paste -s -d '\0' - | od -b > 000 150 145 154 154 157

Re: fix races in if_clone_create()

2020-06-26 Thread Vitaliy Makkoveev
Sorry, I found a memory leak. Updated diff below. Index: sys/net/if.c === RCS file: /cvs/src/sys/net/if.c,v retrieving revision 1.610 diff -u -p -r1.610 if.c --- sys/net/if.c22 Jun 2020 09:45:13 - 1.610 +++

Re: Stuck in Needbuf state, trying to understand (6.7)

2020-06-26 Thread Stuart Henderson
On 2020/06/26 15:30, sven falempin wrote: > behavior confirmed on current. > > Once the process stalls, ( could be anything writing to the vnconfig disk, > cp , umount ) > a few other calls like df , or ps, etc may hang, never the same > sp or mp kernel, reproduced on today's snapshots.

top: add missing scroll keys to help page, name default signal

2020-06-26 Thread Klemens Nanni
The order of commands is not in sync between help page and manual, but I refrained from reordering to avoid churn. OK? NB: On a 80x24 xterm, the help page is already using the last line, hiding all of the "Hit any key to continue: " prompt except its first five characters which land on the last

Re: pipex(4): use reference counters for `ifnet'

2020-06-26 Thread Vitaliy Makkoveev
On Fri, Jun 26, 2020 at 02:29:03PM +0200, Martin Pieuchot wrote: > On 26/06/20(Fri) 12:35, Vitaliy Makkoveev wrote: > > On Fri, Jun 26, 2020 at 10:23:42AM +0200, Martin Pieuchot wrote: > > > On 25/06/20(Thu) 19:56, Vitaliy Makkoveev wrote: > > > > Updated diff. > > > > > > > > OpenBSD uses 16

Re: fix races in if_clone_create()

2020-06-26 Thread Martin Pieuchot
On 26/06/20(Fri) 16:56, Vitaliy Makkoveev wrote: > if_clone_create() has the races caused by context switch. Can you share a backtrace of such race? Where does the kernel panic?

awk FS behaviour change

2020-06-26 Thread Stuart Henderson
The Sep 10, 2019 version of awk introduced a change in handling this: ifconfig egress | awk '/inet / {FS="[ .]"; print "host-"$4"-"$5"}' Given a line like inet 10.20.30.40 netmask 0xff00 broadcast 10.20.30.255 it used to return host-30-40, now it returns

Re: awk FS behaviour change

2020-06-26 Thread Klemens Nanni
On Fri, Jun 26, 2020 at 03:41:21PM -0600, Todd C. Miller wrote: > The awk manual leaves a lot of things unspecified (buy the book ;-). > Does this addition help clear things up? Yes. > Index: awk.1 > === > RCS file:

Re: 11n Tx aggregation for iwm(4)

2020-06-26 Thread Landry Breuil
On Fri, Jun 26, 2020 at 02:45:53PM +0200, Stefan Sperling wrote: > This patch adds support for 11n Tx aggregation to iwm(4). > > Please help with testing if you can by running the patch and using wifi > as usual. Nothing should change, except that Tx speed may potentially > improve. If you have

Re: 11n Tx aggregation for iwm(4)

2020-06-26 Thread Todd Carson
This is from an 8265: iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless-AC 8265" rev 0x88, msi iwm0: hw rev 0x230, fw ver 34.0.1, Associated to an Apple AirPort AP on a 5 GHz channel. Before: bandwidth min/avg/max/std-dev = 11.402/17.410/36.190/4.079 Mbps After: bandwidth

[PATCH} Optimized rasops32 putchar

2020-06-26 Thread johnc
Optimized 32 bit character rendering with unrolled rows and pairwise foreground / background pixel rendering. If it weren't for the 5x8 font, I would have just assumed everything was an even width and made the fallback path also pairwise. In isolation, the 16x32 character case got 2x faster, but

top: remove handle abstraction, use simpler process list

2020-06-26 Thread Klemens Nanni
The internal handle used to pass process information is a needless abstraction, after previously removing an unused member, it now only has one member pointing to a pointer to a process struct, i.e. a simple list of processes. Remove the abstraction layer and (re)use the existing list of

Re: 11n Tx aggregation for iwm(4)

2020-06-26 Thread Florian Obser
Seems to be working on a X1 gen2 using iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev 0x83, msi against a Unifi AP-SHD. Before: bandwidth min/avg/max/std-dev = 7.344/9.077/11.514/0.803 Mbps after: bandwidth min/avg/max/std-dev = 12.551/65.407/82.835/14.169 Mbps -- I'm

Re: ffs(3): libc arch versions, regress

2020-06-26 Thread Mark Kettenis
> Date: Thu, 25 Jun 2020 23:05:36 +0200 > From: Christian Weisgerber > > Trying again, this time with powerpc64 added: > > This adds the optimized ffs(3) versions on aarch64, powerpc, and > powerpc64 to libc. Also add a brief regression test. Not yet in the position to test the powerpc64

Re: pipex(4): use reference counters for `ifnet'

2020-06-26 Thread Vitaliy Makkoveev
On Fri, Jun 26, 2020 at 10:23:42AM +0200, Martin Pieuchot wrote: > On 25/06/20(Thu) 19:56, Vitaliy Makkoveev wrote: > > Updated diff. > > > > OpenBSD uses 16 bit counter for allocate interface indexes. So we can't > > store index in session and be sure if_get(9) returned `ifnet' is our > >

Re: userland clock_gettime proof of concept

2020-06-26 Thread Paul Irofti
On Wed, Jun 24, 2020 at 11:53:23AM +0200, Robert Nagy wrote: > On 22/06/20 19:12 +0300, Paul Irofti wrote: > > New iteration: > > > > - ps_timekeep should not coredump, pointed by deraadt@ > > - set ps_timekeep to 0 before user uvm_map for randomization > > - map timekeep before fixup.

Re: [PATCH] fast conditional console scrolling

2020-06-26 Thread johnc
I should have been more rigorous -- I had two different changes running on my system, as well as forcing it to use the 12x24 font for a 160x45 console. If you apply the "Optimized rasops32 putchar" patch I just posted, you should see another significant speedup. Original Message