From owner-svn-src-stable@freebsd.org Wed Jun 8 18:19:35 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 656BAB6F8E2; Wed, 8 Jun 2016 18:19:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D2E11BA2; Wed, 8 Jun 2016 18:19:35 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u58IJYwY049612; Wed, 8 Jun 2016 18:19:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u58IJYnU049610; Wed, 8 Jun 2016 18:19:34 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201606081819.u58IJYnU049610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 8 Jun 2016 18:19:34 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2016 18:19:35 -0000 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 #include #include +#include #include #include @@ -48,14 +49,19 @@ static void usage(void) { - printf("Usage: %s [-E|-f|-m] OPTIONS [ " + printf("Usage: %s [-c period] [-EfmVz] channel-number num-txns [ " "[ [duration]]]\n", getprogname()); - printf(" %s -r [-v] OPTIONS []\n\n", + printf(" %s -r [-c period] [-vVwz] channel-number address []\n\n", getprogname()); - printf(" OPTIONS:\n"); - printf(" -c - 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 -
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;