OpenBSD cvs log

created 2019-04-30T03:21:57Z
begin 2019-02-21T00:00:00Z
end 2019-02-28T00:00:00Z
path src/sys
commits 38

date 2019-02-21T03:16:47Z
author dlg
files src/sys/dev/pci/if_ix.c log diff annotate
src/sys/dev/pci/if_ix.h log diff annotate
message get rid of atomic_foo ops in the tx start and completion paths.

atomics were used to coordinate updates to the number of available
slots on the tx ring. start would use what was available, and txeof
(completion) would add back freed slots. start and completion
update a producer and consumer index respectively, so we can use
those with the size of the ring to calculate space instead.

while here i simplified what txeof does a fair bit, which combined
with the removal of the atomics gives us a bit of a speed improvement.
hrvoje popovski reports up to a 20% improvement in one environment,
but 5 to 10 is probably more realistic.

ive had this in a tree since 2017, but mpi's "Faster vlan(4)
forwarding?" post made me dig it out and clean it up.

ok jmatthew@

date 2019-02-21T03:37:30Z
author jsg
files src/sys/arch/arm64/arm64/cpu.c log diff annotate
message Cortex A76 is not affected by spectre variant 2 branch target injection
attacks described in CVE-2017-5715 and ATF does not implement a
workaround for Cortex A76.

date 2019-02-21T22:44:44Z
author patrick
files src/sys/dev/usb/xhci.c log diff annotate
message Transfers that span multiple TRBs which wrap around the ring and
thus have the Link TRB inbetween must have the Chain Bit set in the
Link TRB. Otherwise xHCI controllers might think that the transfer
ends at that point.

Fixes an issue that was most prominently seen as Invalid CSW error
when using umass0 on octeon and i.MX8M.

Tested by visa@
ok mpi@

date 2019-02-22T07:53:56Z
author tedu
files src/sys/uvm/uvm_km.c log diff annotate
message at some point the uvm_km_thread learned to free memory, but the comment
was never updated.
from Amit Kulkarni

date 2019-02-22T09:39:33Z
author patrick
files src/sys/dev/fdt/ssdfb.c log diff annotate
message Allow ssdfb(4) to be mmap(2)-able so that we can use its framebuffer
from the userland. Also allow changing the brightness levels so that
it can even be turned off to save power and to prevent burn in.

date 2019-02-23T03:37:50Z
author jsg
files src/sys/arch/arm64/arm64/cpu.c log diff annotate
message recognise more arm cpus
ok patrick@

date 2019-02-24T09:11:09Z
author anton
files src/sys/kern/vfs_lockf.c log diff annotate
message initialize struct lockf fields in a consistent order; ok millert@ mpi@ visa@

date 2019-02-24T09:24:52Z
author anton
files src/sys/kern/vfs_lockf.c log diff annotate
message always include the lock id address in debug output

date 2019-02-24T09:36:28Z
author stsp
files src/sys/net80211/ieee80211_amrr.c log diff annotate
message Remove 11n support from AMRR. All 11n drivers switched to MiRA long ago.

date 2019-02-24T09:37:18Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
src/sys/dev/pci/if_iwmvar.h log diff annotate
message Rework iwm(4) Tx rate selection.

Ask firmware to retry at a constant Tx rate instead of successively lower
rates. This provides better feedback to Tx rate scaling algorithms in our
kernel and thus increases Tx throughput, especially on clean channels.

Make the driver fall back to CCK rates on 2 GHz channels if 11n MCS
don't work. Previously, we were relying on firmware to do this for us.

Tested on 7260, 7265, 8260, 8265 by me, jcs@, tb@, solene@, Matthias Schmidt.

date 2019-02-24T12:57:14Z
author kn
files src/sys/arch/alpha/stand/netboot/Makefile log diff annotate
message Remove -S from install commands

As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and
install(1) will always create files safely, thus clean the option usage
from the tree.

Diff from Lauri Tirkkonen , thanks.

date 2019-02-24T17:35:29Z
author patrick
files src/sys/dev/usb/usbdevs log diff annotate
message Dynastream ANTUSB-2, from Jan Klemkow.

date 2019-02-24T17:35:44Z
author patrick
files src/sys/dev/usb/usbdevs.h log diff annotate
src/sys/dev/usb/usbdevs_data.h log diff annotate
message regen

date 2019-02-24T17:36:28Z
author patrick
files src/sys/dev/usb/uscom.c log diff annotate
message Dynastream ANTUSB-2 works well on uscom(4), from Jan Klemkow.

date 2019-02-24T22:49:31Z
author dlg
files src/sys/dev/pci/if_ixl.c log diff annotate
message get rid of an unused softc member

date 2019-02-25T04:50:25Z
author visa
files src/sys/kern/kern_lock.c log diff annotate
message Fix memory barrier in __mtx_leave(). membar_exit_before_atomic() cannot
be used in the routine because there is no subsequent atomic operation.
membar_exit() has to be used instead.

The mistake has not caused problems because on most platforms
membar_exit_before_atomic() is membar_exit(). Only amd64 and i386 have
a dedicated membar_exit_before_atomic(), and their exit barriers are
no-ops.

OK dlg@

date 2019-02-25T11:29:30Z
author jca
files src/sys/arch/luna88k/dev/siotty.c log diff annotate
message Typo in comment

spotted by miod

date 2019-02-26T03:09:50Z
author dlg
files src/sys/dev/pci/if_ix.c log diff annotate
message put the rx buffer at the end of the mbuf

this should give a bit of space if the packet needs an m_pullup.
care is taken to ensure the packet is still aligned for the ip
stack.

ok and tweaks claudio@

date 2019-02-26T03:12:34Z
author dlg
files src/sys/dev/pci/if_ixl.c log diff annotate
message avoid a deadlock in ixl_down when calling ifq_barrier.

this is particularly noticable on sparc64 when you reboot.

ok jmatthew@

date 2019-02-26T03:17:18Z
author dlg
files src/sys/dev/pci/if_ixl.c log diff annotate
message put the rx buffer at the end of the cluster.

makes m_prepend later less likely to allocate a new mbuf.

date 2019-02-26T03:19:11Z
author dlg
files src/sys/sys/sockio.h log diff annotate
message add some generic ioctls for configuring mpls pseudowire parameters.

these will replace the monstor mpw ioctl, and will be used by an
upcoming mpls ip tunnel interface driver.

discussed with claudio@ at a2k19
ok mpi@

date 2019-02-26T03:20:08Z
author dlg
files src/sys/net/if.c log diff annotate
message check for root on mpls and pwe3 ioctls

part of a larger diff ok mpi@

date 2019-02-26T03:22:36Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message add support for the new pwe3 ioctls.

the existing mpw ioctl is still available for ldpd to use for a
(short) while.

discussed with claudio@ at a2k19
ok mpi@

date 2019-02-26T03:23:04Z
author dlg
files src/sys/net/if_mpe.c log diff annotate
message use NET_LOCK to coordinate destroying a cloned interface.

date 2019-02-26T03:44:50Z
author dlg
files src/sys/net/if_mpw.c log diff annotate
message don't check the pseudowire type in tx and rx paths.

whether the mpw interface is advertising "ethernet" or "ethernet-
tagged" is something the ends of the wire agree on (ie, ldpd is
configured a certain way), it is not something that affects ethernet
encap or decap.

the MPW ioctls can still configure it and read it, but it has no
bearing on how the driver operates on packets.

date 2019-02-26T04:04:30Z
author dlg
files src/sys/dev/pci/if_ix.c log diff annotate
message don't let rxr completely fill the rxr ring.

at the moment there are 256 slots on the right. if rxr raises the
high watermark to 256, we overwrite ring entries.

date 2019-02-26T06:26:17Z
author dlg
files src/sys/dev/pci/pcidevs.h log diff annotate
src/sys/dev/pci/pcidevs_data.h log diff annotate
message i forgot to commit a regen after fixing some bcm entries

date 2019-02-26T08:51:15Z
author kn
files src/sys/dev/pci/if_iwn.c log diff annotate
message Re-enable interrupts on resume with RF switch disabled

When disabling the switch, suspending and eventually resuming again with
wifi still off, re-enabling the switch has no effect due to interrupts
being disabled completely.

To ensure seemless operation, explicitly enable interrupts during hardware
initialization iff the switch is disabled.

While here, initialize the interrupt mask up front to avoid clearing the
previously set mask in any case.

OK mlarkin, Feedback and OK ststp

date 2019-02-26T14:24:21Z
author visa
files src/sys/conf/files log diff annotate
src/sys/kern/init_main.c log diff annotate
src/sys/kern/kern_sched.c log diff annotate
src/sys/kern/kern_smr.c log diff annotate
src/sys/kern/sched_bsd.c log diff annotate
src/sys/sys/sched.h log diff annotate
src/sys/sys/smr.h log diff annotate
src/sys/uvm/uvm_page.c log diff annotate
message Introduce safe memory reclamation, a mechanism for reclaiming shared
objects that readers can access without locking. This provides a basis
for read-copy-update operations.

Readers access SMR-protected shared objects inside SMR read-side
critical section where sleeping is not allowed. To reclaim
an SMR-protected object, the writer has to ensure mutual exclusion of
other writers, remove the object's shared reference and wait until
read-side references cannot exist any longer. As an alternative to
waiting, the writer can schedule a callback that gets invoked when
reclamation is safe.

The mechanism relies on CPU quiescent states to determine when an
SMR-protected object is ready for reclamation.

The header additionally provides an implementation of
singly- and doubly-linked lists that can be used together with SMR.
These lists allow lockless read access with a concurrent writer.

Discussed with many
OK mpi@ sashan@

date 2019-02-26T22:24:41Z
author deraadt
files src/sys/arch/macppc/stand/tbxidata/bsd.tbxi log diff annotate
src/sys/conf/newvers.sh log diff annotate
src/sys/sys/ktrace.h log diff annotate
src/sys/sys/param.h log diff annotate
message crank to 6.5-beta

date 2019-02-26T23:12:58Z
author dlg
files src/sys/dev/pci/if_ixl.c log diff annotate
message tweak the mbuf loading in the tx path so it's easier to read.

count mbuf load failures as output errors so i can see if that's
a problem (it's not, but at least i can see it isn't now).

date 2019-02-27T01:09:06Z
author stsp
files src/sys/dev/pci/if_iwn.c log diff annotate
message Fix iwn(4) scan misreporting the channel of wifi networks in some situations.
Problem noticed by jmc@

date 2019-02-27T04:10:35Z
author stsp
files src/sys/dev/ic/ar5008.c log diff annotate
message Implement support for dynamic RTS threshold in MiRA.
Improves throughput and latency on 11n networks.
Tested by myself, jmc@, jcs@, phessler@, benno@

date 2019-02-27T04:10:38Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
src/sys/dev/pci/if_iwn.c log diff annotate
message Implement support for dynamic RTS threshold in MiRA.
Improves throughput and latency on 11n networks.
Tested by myself, jmc@, jcs@, phessler@, benno@

date 2019-02-27T04:10:40Z
author stsp
files src/sys/net80211/ieee80211_mira.c log diff annotate
src/sys/net80211/ieee80211_mira.h log diff annotate
message Implement support for dynamic RTS threshold in MiRA.
Improves throughput and latency on 11n networks.
Tested by myself, jmc@, jcs@, phessler@, benno@

date 2019-02-27T05:22:37Z
author patrick
files src/sys/dev/usb/xhci.c log diff annotate
message Make xhci_ring_produce() check the previous TRB to find out if it
needs the Chain Bit set or not instead of using the last parameter,
which is used to mark the last TRB in a USB transfer, not in a TD.
To make that work we need to setup the recently acquired TRB before
calling xhci_xfer_get_trb() the next time. Thus setting up the
initial TRB has to happen right away. To kick the transfer off we
simply flip the toggle bit on the first TRB right at the end.

Fixes regression for jcs@, dhill@ and stsp@
Initially discussed with mpi@
ok stsp@

date 2019-02-27T06:00:29Z
author stsp
files src/sys/net80211/ieee80211_proto.c log diff annotate
message Back in 2016 we enabled RTS threshold by default because it apparently
helped us on a loaded hackathon wifi network. In 11n mode we are now
using a heuristic for this. Disable RTS threshold for all other modes
again because it can do more harm than good in many situations.

This change may increase Tx throughput in 11a/g modes, though results depend
on the driver. Some drivers, e.g. urtwn(4), keep using RTS regardless for
unknown reasons and may need to be fixed separately. And we will keep using
RTS if the AP enables 11g protection while 11b clients are around.

date 2019-02-27T07:47:57Z
author stsp
files src/sys/dev/pci/if_iwm.c log diff annotate
message Make iwm(4) use CTS-to-self for HT protection if the AP requests this,
rather than always using RTS for HT protection.