summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2020-05-21Add missing ICANON check in filt_ptcwrite().Martin Pieuchot
ok millert@, visa@
2020-05-21Kill commented out czttypoll() routine.Martin Pieuchot
ok visa@
2020-05-21don't count packets in the carp protocol handling against an interface.David Gwynne
these packets have generally already been counted on the interface because that's where they were sent or received from. the protocol handling side of things already counts things like packets, which you see with netstat -sp carp.
2020-05-21implement a carp_transmit that bypasses the ifq on output.David Gwynne
this is modelled on vlan_transmit, and basically enqueues the packet directly on the parent interface. even though carp is generally not used to transmit packets, we run dhcp relays on it at work and hit a situation where we unecessarily dropped packets because it's ifq maxlen was 1. i've been running this for a month in production. ok jmatthew@
2020-05-21Make use of checksum offloads. Very little effort required from theJonathan Matthew
driver here. remi@ observed a small but noticeable improvement in packet forwarding performance, and I saw a significant increase in TCP receive throughput, especially with high MTU. ok dlg@
2020-05-21Use <dev/clock_subr.h> in dsclock(4).Visa Hankala
Looks good to miod@
2020-05-21Use <dev/clock_subr.h> in dpclock(4).Visa Hankala
Looks good to miod@
2020-05-21Use <dev/clock_subr.h> in dsrtc(4).Visa Hankala
Tested on IP30 with DS1687. Looks good to miod@
2020-05-21Update comment to reflect current headers.Visa Hankala
OK millert@
2020-05-21Remove sparc64 mutex.S.Visa Hankala
The architecture has been using the MI mutex for a while. OK mpi@
2020-05-21don't limit the output queue (ifq) length to 1 anymore.David Gwynne
if we use the ifq to move packet processing to another context, it's too easy to fill up the one slot and cause packet loss. the ifq len was set to 1 to avoid delays produced by the original implementation of tx mitigation. however, trunk now introduces latency because it isn't mpsafe yet, which causes the network stack to have to take the kernel lock for each packet, and the kernel lock can be quite contended. i want to use the ifq to move the packet to the systq thread (which already has the kernel lock) before trunk is asked to transmit it. tested by mark patruck and myself.
2020-05-21back out 1.38. some bits of the stack aren't ready for it yet.David Gwynne
mark patruck found significant packet drops with trunk(4), and there's some reports that pppx or pipex relies on some implicit locking that it shouldn't. i can fix those without this diff being in the tree.
2020-05-20Open up a 4GB memory bus window for mvneta(4) on the MarvellPatrick Wildt
Armada 3700. This makes my second ethernet controller/port work on the Turris Mox. ok kettenis@
2020-05-20kernel.h: remove global declaration for naptimecheloha
naptime is now a member of the timehands, th_naptime.
2020-05-20clock_gettime(2): use nanoruntime(9) to get value for CLOCK_UPTIMEcheloha
2020-05-20timecounting: decide whether to advance offset within tc_windup()cheloha
When we resume from a suspend we use the time from the RTC to advance the system offset. This changes the UTC to match what the RTC has given us while increasing the system uptime to account for the time we were suspended. Currently we decide whether to change to the RTC time in tc_setclock() by comparing the new offset with the th_offset member. This is wrong. th_offset is the *minimum* possible value for the offset, not the "real offset". We need to perform the comparison within tc_windup() after updating th_offset, otherwise we might rewind said offset. Because we're now doing the comparison within tc_windup() we ought to move naptime into the timehands. This means we now need a way to safely read the naptime to compute the value of CLOCK_UPTIME for userspace. Enter nanoruntime(9); it increases monotonically from boot but does not jump forward after a resume like nanouptime(9).
2020-05-20Extend drmkqfilter() to support EVFILT_READ and match drmpoll() behavior.Martin Pieuchot
Locking `event_lock' in filt_drmread() is currently commented out as it requires some refactoring to use proper 'struct drm_minor' like upstream. That said, it is fine as long as all the code is run under KERNEL_LOCK(). ok visa@
2020-05-20Use `if_bpf' directly instead of the non-initialized duplicated copy of it.Martin Pieuchot
From Sergey Ryazanov. Reviewed by Vitaliy Makkoveev, ok claudio@
2020-05-20defer calling !IFXF_MPSAFE driver start routines to the systqDavid Gwynne
this reuses the tx mitigation machinery, but instead of deferring some start calls to the nettq, it defers all calls to the systq. this is to avoid taking the KERNEL_LOCK while processing packets in the stack. i've been running this in production for 6 or so months, and the start of a release is a good time to get more people trying it too. ok jmatthew@
2020-05-19Revert previous; Set the ESS capability bit in assoc requests again.Stefan Sperling
Association to some access points breaks without the ESS capability bit. Apparently I misunderstood something. Reported by krw@ and tb@
2020-05-19We need to double the clock frequency for DDR modes.Mark Kettenis
2020-05-19Don't provide backlight control if the list returned by _BCL is empty.Mark Kettenis
Prevents crashes on broken AML. ok jcs@
2020-05-19If we pass a packet length larger than 2^16, we should panic() insteadPatrick Wildt
of returning -1. With a return type of u_int16_t, -1 is not different to a valid checksum. For incoming packets, the header lengths don't exceed that size anyway, but for outgoing packets it's better to see if our bootloader crafts a broken one. Discussed with gerhard@ ok deraadt@ procter@
2020-05-19Do not set the 802.11 ESS capability bit in association requests.Stefan Sperling
The ESS capability bit should be set if the transmitter is an AP. Association requests are sent by clients. ok jca@
2020-05-19Use static inline instead of inline; fixes ramdisk build.Mark Kettenis
2020-05-19Implement kqueue(2) support.Martin Pieuchot
Assert that the KERNEL_LOCK() has to be held before grabbing `audio_lock' to prevent lock ordering issues inside selwakeup(). ok visa@, ratchov@
2020-05-18Offload CCMP (WPA2) encryption and decryption to iwm(4) hardware.Stefan Sperling
This reduces CPU load during traffic bursts. Based on an older diff we had in CVS history, updated to work with newer firmware versions we use today. Tested on the following devices, with great support from several people: 3160 (stsp) 3168 (stsp) 7260 (jmatthew, tobhe) 7265 (stsp, procter, gonzalo) 8265 (benno, tb) 8260 (stsp, Liberto on bsd.network) 9260 (stsp, Jesper Wallin) 9560 (stsp) Not tested: 3165; these run the same firmware as 7265 so will likely be fine. I couldn't find a 3165 device in my pile. ok jmatthew@ (who also found a small bug in my diff)
2020-05-18Oops, DDB wrapper around setjmp/longjmp was misplacedTheo de Raadt
2020-05-18Sync in_cksum.c to the same version ospfd has. This fixes problemsPatrick Wildt
with odd packet lengths, which can happen when using TFTP to load a file with an odd length. ospfd actually took dvmrpd's version in 2006 to fix the same issue, and both daemons implementations are the same. For the bootloader we keep the consts from the previous version and replace the fatal with a print and return. ok deraadt@
2020-05-18Move boot.mac into the Attic.Patrick Wildt
ok deraadt@
2020-05-18During the rekey operation, we feedback 1 word to the lowest level.Theo de Raadt
But it was a constant, that is really silly. Pass back the first word from the middle layer. ok visa
2020-05-18Our check to see if the EFI services support Mtftp() doesn't workPatrick Wildt
on U-Boot anymore, since we checked if the method is provided, but now U-Boot provides a simple stub that only returns EFI_UNSUPPORTED. A proper UEFI would throw EFI_INVALID_PARAMETER if we pass NULL as first parameter, but U-Boot doesn't. This way we can see if the method is actually provided and not just a stub. ok kettenis@
2020-05-18Turn power domain on. Makes OpenBSD boot on the odroid c4.Mark Kettenis
2020-05-18Add some comments.Mark Kettenis
2020-05-18Enable amlpwrc(4).Mark Kettenis
2020-05-18Add amlpwrc(4), a driver for the power domain controller found on variousMark Kettenis
Amlogic SoCs.
2020-05-18Fix typoClaudio Jeker
2020-05-17Add enough stubs to allow "option DDB" to build.gkoehler
ok kettenis@
2020-05-17Fix typo in comment.Mark Kettenis
2020-05-17Add support for the SM1 variant and (probably) fix support for the CPUMark Kettenis
clock on the G12A variant.
2020-05-17Use a register varible ro implement curpcu().Mark Kettenis
2020-05-17Add machdep.compatible.Mark Kettenis
ok jsg@
2020-05-17Look at the openbsd,boothowto property.Mark Kettenis
ok visa@
2020-05-17Hand those pages over to uvm.Mark Kettenis
2020-05-17Remove board ID support. 6.7 shipped with a kernel that doesn't needMark Kettenis
it anymore. jsg@
2020-05-17restore VGA fonts on VT switchJonathan Gray
Avoids an unusable screen when switching to a VT with a custom VGA font from X. While it is possible to modify the xserver to invoke an ioctl for this kettenis@ points out the xserver may have crashed so doing it in the kernel is preferred. Problem reported by and patch from John Carmack. Changed slightly to do the vga_restore_fonts() (write to video memory) call before vga_setfont() (pointing the character generator at it) at the suggestion of kettenis@. ok kettenis@
2020-05-17Put setjmp+longjmp inside #ifdef DDB the only kernel-side user.Theo de Raadt
This shrinks the ramdisks a tiny bit.
2020-05-17Fix typo in comment.Mark Kettenis
2020-05-17Add function for attaching RTC drivers, to reduce direct useVisa Hankala
of todr_handle. OK kettenis@
2020-05-17The 64-bit Power ABI reserves r13 for the thread pointer, so use thatMark Kettenis
to hold a pointer to our struct cpu_info.