Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2016 18:19:34 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r301677 - stable/10/tools/tools/ioat
Message-ID:  <201606081819.u58IJYnU049610@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Jun  8 18:19:34 2016
New Revision: 301677
URL: https://svnweb.freebsd.org/changeset/base/301677

Log:
  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.

Modified:
  stable/10/tools/tools/ioat/ioatcontrol.8
  stable/10/tools/tools/ioat/ioatcontrol.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/tools/ioat/ioatcontrol.8
==============================================================================
--- stable/10/tools/tools/ioat/ioatcontrol.8	Wed Jun  8 18:16:34 2016	(r301676)
+++ stable/10/tools/tools/ioat/ioatcontrol.8	Wed Jun  8 18:19:34 2016	(r301677)
@@ -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

Modified: stable/10/tools/tools/ioat/ioatcontrol.c
==============================================================================
--- stable/10/tools/tools/ioat/ioatcontrol.c	Wed Jun  8 18:16:34 2016	(r301676)
+++ stable/10/tools/tools/ioat/ioatcontrol.c	Wed Jun  8 18:19:34 2016	(r301677)
@@ -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;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606081819.u58IJYnU049610>