Re: sosleep(), SO_RCVTIMEO and TIMEVAL_TO_NSEC()

2020-01-11 Thread Scott Cheloha
On Thu, Jan 09, 2020 at 04:10:03PM +0100, Martin Pieuchot wrote: > SO_RCVTIMEO and SO_SNDTIMEO allow userland to specify a timeout value > via a 'struct timeval'. Internally the kernel keeps this time > representation in ticks. Diff below changes that to nanoseconds which > allows us to use

Re: sosleep(), SO_RCVTIMEO and TIMEVAL_TO_NSEC()

2020-01-11 Thread Scott Cheloha
On Sat, Jan 11, 2020 at 09:43:04PM +0100, Alexander Bluhm wrote: > On Thu, Jan 09, 2020 at 04:10:03PM +0100, Martin Pieuchot wrote: > > case SO_RCVTIMEO: > > { > > struct timeval tv; > > - int val; > > + uint64_t

Re: IPL of timeout_set_proc(9)

2020-01-11 Thread Scott Cheloha
On Sat, Jan 11, 2020 at 05:41:00PM +0100, Martin Pieuchot wrote: > Before converting network timeouts to run in a thread context they were > executed in a soft-interrupt handler. This design implied that timeouts > were serialized. Yep. > The current "softclock" thread runs on CPU0 to limit

[patch] signify's file name parsing broken

2020-01-11 Thread Marcus Müller
Dear OpenBSD community, I've just stumbled across a malfunction in signify: It cannot handle file names that contain a `)` character, when checking a list of hashes generated by `sha256` command line utilities (`sha256sum --tags` on Linux). To blame for this is this simple statement in

(re) [PATCH] src/libexec/ftpd: fix nlist with -option does not work

2020-01-11 Thread SASANO Takayoshi
ping On Mon, 18 Nov 2019 14:56:46 +0900, SASANO Takayoshi wrote: > > Hello, > > At least OpenBSD-6.5 and 6.6's ftpd does not work NLIST command with any > -option like this. > > > ftp> nlist > 150 Opening ASCII mode data connection for 'file list'. > uaa > _sysupgrade > 226 Transfer

Re: sosleep(), SO_RCVTIMEO and TIMEVAL_TO_NSEC()

2020-01-11 Thread Alexander Bluhm
On Thu, Jan 09, 2020 at 04:10:03PM +0100, Martin Pieuchot wrote: > case SO_RCVTIMEO: > { > struct timeval tv; > - int val; > + uint64_t nsecs; > > if (m == NULL || m->m_len < sizeof

Re: dwiic(4) improvements

2020-01-11 Thread Claudio Jeker
On Sat, Jan 11, 2020 at 12:46:17PM +0100, Mark Kettenis wrote: > > Date: Fri, 10 Jan 2020 12:07:51 +0100 > > From: Claudio Jeker > > > > On Sun, Dec 22, 2019 at 04:55:59PM +0100, Mark Kettenis wrote: > > > The diff below contains a couple of improvements to dwiic(4). They're > > > mostly for

Fix ipmi(4) sensor calculation

2020-01-11 Thread Mark Kettenis
The calculation uses 'char' to store a signed value. But on some platforms 'char' is unsigned, and the calculation yields bogus results. Fixed by the diff below. ok? Index: dev/ipmi.c === RCS file: /cvs/src/sys/dev/ipmi.c,v

Re: IPL of timeout_set_proc(9)

2020-01-11 Thread Mark Kettenis
> Date: Sat, 11 Jan 2020 17:41:00 +0100 > From: Martin Pieuchot > > Before converting network timeouts to run in a thread context they were > executed in a soft-interrupt handler. This design implied that timeouts > were serialized. > > The current "softclock" thread runs on CPU0 to limit

IPL of timeout_set_proc(9)

2020-01-11 Thread Martin Pieuchot
Before converting network timeouts to run in a thread context they were executed in a soft-interrupt handler. This design implied that timeouts were serialized. The current "softclock" thread runs on CPU0 to limit border effects due to the conversion from soft-interrupt to thread context.

[PATCH] including sys/errno.h twice

2020-01-11 Thread Alex Naumov
Hey, we include sys/errno.h twice... Have a nice weekend, Alexander Index: copystr.S === RCS file: /cvs/src/sys/arch/arm64/arm64/copystr.S,v retrieving revision 1.5 diff -u -p -r1.5 copystr.S --- copystr.S 19 Jun 2019 08:00:17

Re: kern: timeout_add -> timeout_add_msec

2020-01-11 Thread Martin Pieuchot
Hello, On 10/01/20(Fri) 20:47, j...@posteo.de wrote: > this diff changes timeout_add(9) to timeout_add_msec(9). > Since the changes are fairly short, I took the liberty to put > all diffs of sys/kern/ into this mail. > If you want me to send indiviual mails please say so. I would be delighted if

Re: hifn(4): timeout_add(9) -> timeout_add_msec(9)

2020-01-11 Thread Alexander Bluhm
On Fri, Jan 10, 2020 at 05:16:09PM -0600, Scott Cheloha wrote: > Basically the same diff as yesterday's ubsec(4) conversion. > > The code caps the interval at 10ms, so rename "sc_rnghz" to "sc_rngms" > and set it to 10ms, then replace timeout_add(9) with timeout_add_msec(9). > > ok? OK bluhm@ >

Re: dwiic(4) improvements

2020-01-11 Thread Mark Kettenis
> Date: Fri, 10 Jan 2020 12:07:51 +0100 > From: Claudio Jeker > > On Sun, Dec 22, 2019 at 04:55:59PM +0100, Mark Kettenis wrote: > > The diff below contains a couple of improvements to dwiic(4). They're > > mostly for making ipmi(4) on the Ampere/Lenovo arm64 boxes work > > better. But they

Re: MAKE: redux patch

2020-01-11 Thread Marc Espie
On Fri, Jan 10, 2020 at 10:52:03PM +0100, Alexander Bluhm wrote: > On Fri, Jan 10, 2020 at 01:58:47PM +0100, Marc Espie wrote: > > Bleh, I forgot to synch two patches I already committed. Here's a patch > > that applies cleanly. > > I did run this make through a full regress. It seems that make

Re: pci(4): autri(4), eap(4): tsleep(9) -> tsleep_nsec(9)

2020-01-11 Thread Alexandre Ratchov
On Sat, Jan 11, 2020 at 02:33:07AM -0600, Scott Cheloha wrote: > Both of these cards have a 100ms sleep when closed. > > ok? > sure, ok ratchov > Index: pci/eap.c > === > RCS file: /cvs/src/sys/dev/pci/eap.c,v > retrieving

ami(4): msleep(9) -> msleep_nsec(9)

2020-01-11 Thread Scott Cheloha
Ticks to seconds. ok? Index: ic/ami.c === RCS file: /cvs/src/sys/dev/ic/ami.c,v retrieving revision 1.236 diff -u -p -r1.236 ami.c --- ic/ami.c31 Dec 2019 10:05:32 - 1.236 +++ ic/ami.c11 Jan 2020 08:44:04 - @@

pci(4): autri(4), eap(4): tsleep(9) -> tsleep_nsec(9)

2020-01-11 Thread Scott Cheloha
Both of these cards have a 100ms sleep when closed. ok? Index: pci/eap.c === RCS file: /cvs/src/sys/dev/pci/eap.c,v retrieving revision 1.57 diff -u -p -r1.57 eap.c --- pci/eap.c 14 Dec 2019 12:48:32 - 1.57 +++ pci/eap.c