Re: pf: remove 'one shot rules'

2020-01-25 Thread Alexandr Nedvedicky
Hello, mikeb@ and me were poking about same idea some time ago (?2016?). But the idea never turned to diff. If I remember correct the only meaningful use case we could come up with for once rules is [t]ftp-proxy. But neither one seems to use once rules at all. I'm OK with removing 'once' rules. Fr

Add support for notifications about audio(4) "mixer" controls changes

2020-01-25 Thread Alexandre Ratchov
The diff bellow allows programs to get notifications about changes of audio controls. Programs open the /dev/audioctlN device node and use the read(4) syscall to get the index of each changed control. There may be only one reader at a time. Supporting multiple readers would be much more complicate

hidmt(4): only allow hid_input kind

2020-01-25 Thread Patrick Wildt
Hi, on the Pinebook Pro the trackpad isn't working. The reason is that the Y-coordinate is extracted twice. The first location has thevalue correctly, the second location has it zeroed or garbage. This is because when we iterate over the report, the Y-coordinate usage appears twice. This shoul

Re: Add #define for RFC8622 IPTOS_DSCP_LE codepoint

2020-01-25 Thread Job Snijders
On Sat, Jan 25, 2020 at 11:36:53PM +1100, Damien Miller wrote: > This adds a #define for the "lower effort" DSCP code point specified > by https://tools.ietf.org/html/rfc8622 > > People have asked to be able to use this OpenSSH for "don't care" > traffic. > > ok? OK job@

vlan: use SMR_SLIST instead of SRP to protect instance lists

2020-01-25 Thread Jonathan Matthew
Converting vlan(4) to use SMR instead of SRP to protect the instance lists is pretty simple. vlan_input() doesn't keep a reference to vlan_softcs outside the read critical section, so we don't need to reference count them any more. After the smr_barrier() in vlan_clone_destroy, all pointers to the

Re: apmd: fix autoaction timeout

2020-01-25 Thread Ted Unangst
Jeremie Courreges-Anglas wrote: > > The diff below improves the way apmd -z/-Z may trigger. > > I think the current behavior is bogus, incrementing and checking > apmtimeout like this doesn't make much sense. this all seems reasonable to me. > - I think we want some throttling mechanism, like w

acpiac(4): refresh status after resume

2020-01-25 Thread Jeremie Courreges-Anglas
So I have this diff for apmd -z/-Z that uses APM_POWER_CHANGE events to trigger autosuspend. It works fine except for one glitch: if I plug the AC cable and then resume, apmd will receive another APM_POWER_CHANGE event and read the power info only to find that the AC is *unplugged*. So apmd happ

apmd: fix autoaction timeout

2020-01-25 Thread Jeremie Courreges-Anglas
The diff below improves the way apmd -z/-Z may trigger. I think the current behavior is bogus, incrementing and checking apmtimeout like this doesn't make much sense. Here's a proposal: - on APM_POWER_CHANGE events, check the battery level and trigger autoaction if needed. This should be eno

acpisbs(4): send APM events

2020-01-25 Thread Jeremie Courreges-Anglas
acpisbs(4) should send events to userland (apmd) whenever it refreshes its data, just like acpibat(4). I have no hw to test this, I'd welcome a runtime check with apmd -d. ok? Index: acpisbs.c === RCS file: /d/cvs/src/sys/dev/acpi

Re: apmd poll every minute

2020-01-25 Thread Jeremie Courreges-Anglas
On Fri, Jan 24 2020, "Ted Unangst" wrote: > Sometimes (particuarly if you are using apmd -z) the default polling interval > of 10 minutes is a bit lazy and we fail to respond to low battery situations > before they become no battery situations. > > Perhaps something smarter could be done, but the

Add #define for RFC8622 IPTOS_DSCP_LE codepoint

2020-01-25 Thread Damien Miller
Hi, This adds a #define for the "lower effort" DSCP code point specified by https://tools.ietf.org/html/rfc8622 People have asked to be able to use this OpenSSH for "don't care" traffic. ok? Index: sys/netinet/ip.h === RCS file: /c