summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-12-10 07:38:56 +0000
committerngie <ngie@FreeBSD.org>2015-12-10 07:38:56 +0000
commitc85e616e29482200cd0a47fa6c85165a98a4caaf (patch)
tree968c93f62ac9ce060c59926d75ff4e4946b771c6 /tools
parentdcd31244e8ecc492a511e48ed4c631615e092491 (diff)
downloadFreeBSD-src-c85e616e29482200cd0a47fa6c85165a98a4caaf.zip
FreeBSD-src-c85e616e29482200cd0a47fa6c85165a98a4caaf.tar.gz
MFhead @ r292053
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/ioat/ioatcontrol.88
-rw-r--r--tools/tools/ioat/ioatcontrol.c29
2 files changed, 31 insertions, 6 deletions
diff --git a/tools/tools/ioat/ioatcontrol.8 b/tools/tools/ioat/ioatcontrol.8
index 2306d38..002759f 100644
--- a/tools/tools/ioat/ioatcontrol.8
+++ b/tools/tools/ioat/ioatcontrol.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 28, 2015
+.Dd December 9, 2015
.Dt IOATCONTROL 8
.Os
.Sh NAME
@@ -33,7 +33,9 @@
.Xr ioat 4
.Sh SYNOPSIS
.Nm
+.Op Fl E
.Op Fl f
+.Op Fl m
.Op Fl V
.Ar channel_number
.Ar num_txns
@@ -55,10 +57,14 @@ allows one to issue some number of test operations to the
driver on a specific hardware channel.
The arguments are as follows:
.Bl -tag -width Ds
+.It Fl E
+Test non-contiguous 8k copy.
.It Fl f
Test block fill (by default,
.Nm
tests copy)
+.It Fl m
+Test memcpy instead of DMA.
.It Fl V
Verify copies/fills for accuracy
.El
diff --git a/tools/tools/ioat/ioatcontrol.c b/tools/tools/ioat/ioatcontrol.c
index 90255e7..d40ae15 100644
--- a/tools/tools/ioat/ioatcontrol.c
+++ b/tools/tools/ioat/ioatcontrol.c
@@ -48,7 +48,7 @@ static void
usage(void)
{
- printf("Usage: %s [-fV] <channel #> <txns> [<bufsize> "
+ printf("Usage: %s [-E|-f|-m] [-V] <channel #> <txns> [<bufsize> "
"[<chain-len> [duration]]]\n", getprogname());
printf(" %s -r [-vV] <channel #> <addr> [<bufsize>]\n",
getprogname());
@@ -97,15 +97,29 @@ main(int argc, char **argv)
{
struct ioat_test t;
int fd, ch;
- bool fflag, rflag;
+ bool fflag, rflag, Eflag, mflag;
+ unsigned modeflags;
- while ((ch = getopt(argc, argv, "rfvVw")) != -1) {
+ fflag = rflag = Eflag = mflag = false;
+ modeflags = 0;
+
+ while ((ch = getopt(argc, argv, "EfmrvVw")) != -1) {
switch (ch) {
+ case 'E':
+ Eflag = true;
+ modeflags++;
+ break;
case 'f':
fflag = true;
+ modeflags++;
+ break;
+ case 'm':
+ mflag = true;
+ modeflags++;
break;
case 'r':
rflag = true;
+ modeflags++;
break;
case 'v':
t.raw_is_virtual = true;
@@ -126,8 +140,8 @@ main(int argc, char **argv)
if (argc < 2)
usage();
- if (rflag && fflag) {
- printf("Invalid: -r and -f\n");
+ if (modeflags > 1) {
+ printf("Invalid: Cannot use >1 mode flag (-E, -f, -m, or -r)\n");
usage();
}
@@ -139,6 +153,11 @@ main(int argc, char **argv)
if (fflag)
t.testkind = IOAT_TEST_FILL;
+ else if (Eflag) {
+ t.testkind = IOAT_TEST_DMA_8K;
+ t.buffer_size = 8 * 1024;
+ } else if (mflag)
+ t.testkind = IOAT_TEST_MEMCPY;
t.channel_index = atoi(argv[0]);
if (t.channel_index > 8) {
OpenPOWER on IntegriCloud