aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ioat/ioat_test.c
Commit message (Collapse)AuthorAgeFilesLines
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-111-1/+1
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* Deprecate contigfree(9) in favour of free(9)Bjoern A. Zeeb2024-07-261-7/+1
| | | | | | | | | | | | | | | As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer needed and should not be used anymore. We leave a wrapper for 3rd party code in at least 15.x but remove (almost) all other cases from the tree. This leaves one use of contigfree(9) untouched; that was the original trigger for 9e6544dd6e02 and is handled in D45813 (to be committed seperately later). Sponsored by: The FreeBSD Foundation Reviewed by: markj, kib Tested by: pho (10h stress test run) Differential Revision: https://reviews.freebsd.org/D46099
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t.John Baldwin2022-09-221-2/+1
| | | | | | | | This matches the return type of pmap_mapdev/bios. Reviewed by: kib, markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D36548
* ioat(4): Remove Giant from ioat_test enable/disable.Alexander Motin2021-09-041-14/+12
| | | | MFC after: 1 month
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-2/+3
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* ioatcontrol(8) could exercise 8k-aligned copy with page-break, crc andTycho Nightingale2019-04-021-1/+25
| | | | | | | | | | | crc-copy modes. Reviewed by: cem Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D19780 Notes: svn path=/head/; revision=345812
* ioat: don't specify inline for function with variable argument listAndriy Gapon2017-03-041-2/+2
| | | | | | | | | | | Modern GCC and Clang simply ignore the qualifier, while the old base GCC produces a warning (treated as an error in the kernel build). Approved by: cem MFC after: 5 days Notes: svn path=/head/; revision=314666
* ioat(4): ioat_get_dmaengine(): Add M_WAITOK modeConrad Meyer2016-04-091-1/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=297746
* ioatcontrol(8): Add support for interrupt coalescingConrad Meyer2015-12-141-2/+23
| | | | | | | | | | | | | The new flag, -c <period>, sets the interrupt coalescing period in microseconds through the new ioat(4) API ioat_set_interrupt_coalesce(). Also add a -z flag to zero ioat statistics before tests, to make it easy to measure results. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292229
* ioat(4): Add ioatcontrol(8) testing for copy_8kConrad Meyer2015-12-101-9/+44
| | | | | | | | | | Add -E ("Eight k") and -m ("Memcpy") modes to the ioatcontrol(8) tool. Prompted by: rpokala Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=292044
* ioat: Handle channel-fatal HW errors safelyConrad Meyer2015-10-311-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Certain invalid operations trigger hardware error conditions. Error conditions that only halt one channel can be detected and recovered by resetting the channel. Error conditions that halt the whole device are generally not recoverable. Add a sysctl to inject channel-fatal HW errors, 'dev.ioat.<N>.force_hw_error=1'. When a halt due to a channel error is detected, ioat(4) blocks new operations from being queued on the channel, completes any outstanding operations with an error status, and resets the channel before allowing new operations to be queued again. Update ioat.4 to document error recovery; document blockfill introduced in r290021 while we are here; document ioat_put_dmaengine() added in r289907; document DMA_NO_WAIT added in r289982. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290229
* ioat_test: Handled forced hardware resets gracefullyConrad Meyer2015-10-291-3/+14
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290132
* ioatcontrol(8): Add and document "raw" testing modeConrad Meyer2015-10-291-2/+41
| | | | | | | | | | | Allows DMA from/to arbitrary KVA or physical address. /dev/ioat_test must be enabled by root and is only R/W root, so this is approximately as dangerous as /dev/mem and /dev/kmem. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290129
* ioat: Define DMACAPABILITY bitsConrad Meyer2015-10-281-0/+9
| | | | | | | | | Check for BFILL capability before initiating blockfill operations. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290087
* ioat: Add support for Block Fill operationsConrad Meyer2015-10-261-4/+37
| | | | | | | | | | | | | | | | | | | The IOAT hardware supports writing a 64-bit pattern to some destination buffer. The same limitations on buffer length apply as for copy operations. Throughput is a bit higher (probably because fill does not have to spend bandwidth reading from a source in memory). Support for testing Block Fill has been added to ioatcontrol(8) and the ioat_test device. ioatcontrol(8) accepts the '-f' flag, which tests Block Fill. (If the flag is omitted, the tool tests copy by default.) The '-V' flag, in conjunction with '-f', verifies that buffers are filled in the expected pattern. Tested on: Broadwell DE (Xeon D-1500) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=290021
* ioat: refcnt users so we can drain them at detachConrad Meyer2015-10-241-1/+3
| | | | | | | | | | | | | | | | We only need to borrow a mutex for the drain sleep and the 0->1 transition, so just reuse an existing one for now. The wchan is arbitrary. Using refcount itself would have required __DEVOLATILE(), so use the lock's address instead. Different uses are tagged by kind, although we only do anything with that information in INVARIANTS builds. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289907
* ioat_test: Add a colon (':') for styleConrad Meyer2015-10-221-1/+1
| | | | | | | | | Missed in r289776. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289777
* ioat: Clean up loggingConrad Meyer2015-10-221-12/+29
| | | | | | | | | | | | Replace custom Linux-like logging with a thin shim around device_printf(), when the softc is available. In ioat_test, shim around printf(9) instead. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289776
* ioat: Fix some attach/detach issuesConrad Meyer2015-10-221-7/+40
| | | | | | | | | | | | | | | Don't run the selftest until after we've enabled bus mastering, or the DMA engine can't copy anything for our test. Create the ioat_test device on attach, if so tuned. Destroy the ioat_test device on teardown. Replace deprecated 'CALLOUT_MPSAFE' with correct '1' in callout_init(). Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289760
* Improve flexibility of ioat_test / ioatcontrol(8)Conrad Meyer2015-10-221-58/+192
| | | | | | | | | | | | | | | | | | | | | | | | | The test logic now preallocates memory before running the test. The buffer size is now configurable. Post-copy verification is configurable. The number of copies to chain into one transaction (one interrupt) is configurable. A 'duration' mode is added, which repeats the test until the duration has elapsed, reporting the B/s and transactions completed. ioatcontrol.8 has been updated to document the new arguments. Initial limits (on this particular Broadwell-DE) (and when the interrupts are working) seem to be: 256 interrupts/sec or ~6 GB/s, whichever limit is more restrictive. Unfortunately, it seems the interrupt-reset handling on Broadwell isn't working as intended. That will be fixed in a later commit. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289733
* Import ioat(4) driverConrad Meyer2015-08-241-0/+256
I/OAT is also referred to as Crystal Beach DMA and is a Platform Storage Extension (PSE) on some Intel server platforms. This driver currently supports DMA descriptors only and is part of a larger effort to upstream an interconnect between multiple systems using the Non-Transparent Bridge (NTB) PSE. For now, this driver is only built on AMD64 platforms. It may be ported to work on i386 later, if that is desired. The hardware is exclusive to x86. Further documentation on ioat(4), including API documentation and usage, can be found in the new manual page. Bring in a test tool, ioatcontrol(8), in tools/tools/ioat. The test tool is not hooked up to the build and is not intended for end users. Submitted by: jimharris, Carl Delsey <carl.r.delsey@intel.com> Reviewed by: jimharris (reviewed my changes) Approved by: markj (mentor) Relnotes: yes Sponsored by: Intel Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D3456 Notes: svn path=/head/; revision=287117