diff options
author | ngie <ngie@FreeBSD.org> | 2016-06-08 18:19:34 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-06-08 18:19:34 +0000 |
commit | d3f56237be4f1975e52091b8c52fd0c8fbcc48b5 (patch) | |
tree | d02c28957f384fa8195f66e770e0ec0a1e5302ce /tools | |
parent | 628810703257a88dd014b34fccffb99c1dba1da2 (diff) | |
download | FreeBSD-src-d3f56237be4f1975e52091b8c52fd0c8fbcc48b5.zip FreeBSD-src-d3f56237be4f1975e52091b8c52fd0c8fbcc48b5.tar.gz |
MFC r300856,r300857,r300858,r300874:
r300856:
Initialize `t` with memset(.., 0, ..)
This will help ensure that we're not using random garbage on the stack by
accident with respect to the variable
r300857:
Document the default behavior for -c (0)
Bump .Dd for the change
r300858:
Fix description for -V in the -r case
t.verify_test = true is always set when -V is specified, regardless of whether
or not the tool is being run in raw mode
r300874:
Update usage(..)
- Document missing options
- Sync options with ioatcontrol(8).
- Make it clear that the first 2 parameters are always required.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/ioat/ioatcontrol.8 | 7 | ||||
-rw-r--r-- | tools/tools/ioat/ioatcontrol.c | 20 |
2 files changed, 18 insertions, 9 deletions
diff --git a/tools/tools/ioat/ioatcontrol.8 b/tools/tools/ioat/ioatcontrol.8 index 9e156fd..59539f7 100644 --- a/tools/tools/ioat/ioatcontrol.8 +++ b/tools/tools/ioat/ioatcontrol.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 14, 2015 +.Dd May 27, 2016 .Dt IOATCONTROL 8 .Os .Sh NAME @@ -62,7 +62,8 @@ driver on a specific hardware channel. The arguments are as follows: .Bl -tag -width Ds .It Fl c Ar period -Configure the channel's interrupt coalescing period, in microseconds. +Configure the channel's interrupt coalescing period, in microseconds +(defaults to 0). .It Fl E Test non-contiguous 8k copy. .It Fl f @@ -92,7 +93,7 @@ is a kernel virtual address (by default, .Ar address is assumed to be a physical address) .It Fl V -Dump the resulting hex to syslog +Verify copies/fills for accuracy .It Fl w Write to the specified .Ar address diff --git a/tools/tools/ioat/ioatcontrol.c b/tools/tools/ioat/ioatcontrol.c index 32decc7..8556217 100644 --- a/tools/tools/ioat/ioatcontrol.c +++ b/tools/tools/ioat/ioatcontrol.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include <stdio.h> #include <stdint.h> #include <stdlib.h> +#include <string.h> #include <sysexits.h> #include <unistd.h> @@ -48,14 +49,19 @@ static void usage(void) { - printf("Usage: %s [-E|-f|-m] OPTIONS <channel #> <txns> [<bufsize> " + printf("Usage: %s [-c period] [-EfmVz] channel-number num-txns [<bufsize> " "[<chain-len> [duration]]]\n", getprogname()); - printf(" %s -r [-v] OPTIONS <channel #> <addr> [<bufsize>]\n\n", + printf(" %s -r [-c period] [-vVwz] channel-number address [<bufsize>]\n\n", getprogname()); - printf(" OPTIONS:\n"); - printf(" -c <period> - Enable interrupt coalescing (us)\n"); - printf(" -V - Enable verification\n"); - printf(" -z - Zero device stats before test\n"); + printf(" -c period - Enable interrupt coalescing (us) (default: 0)\n"); + printf(" -E - Test non-contiguous 8k copy.\n"); + printf(" -f - Test block fill (default: DMA copy).\n"); + printf(" -m - Test memcpy instead of DMA.\n"); + printf(" -r - Issue DMA to or from a specific address.\n"); + printf(" -V - Enable verification\n"); + printf(" -v - <address> is a kernel virtual address\n"); + printf(" -w - Write to the specified address\n"); + printf(" -z - Zero device stats before test\n"); exit(EX_USAGE); } @@ -104,6 +110,8 @@ main(int argc, char **argv) bool fflag, rflag, Eflag, mflag; unsigned modeflags; + memset(&t, 0, sizeof(t)); + fflag = rflag = Eflag = mflag = false; modeflags = 0; |