xref: /freebsd/tools/tools/ioat/ioatcontrol.8 (revision e17f5b1d)
1.\" Copyright (c) 2015 EMC / Isilon Storage Division
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd May 27, 2016
28.Dt IOATCONTROL 8
29.Os
30.Sh NAME
31.Nm ioatcontrol
32.Nd Userspace tool to test
33.Xr ioat 4
34.Sh SYNOPSIS
35.Nm
36.Op Fl c Ar period
37.Op Fl E
38.Op Fl e
39.Op Fl f
40.Op Fl m
41.Op Fl V
42.Op Fl x
43.Op Fl X
44.Op Fl z
45.Ar channel_number
46.Ar num_txns
47.Ar [ bufsize
48.Ar [ chain-len
49.Ar [ duration ] ] ]
50.Nm
51.Fl r
52.Op Fl c Ar period
53.Op Fl v
54.Op Fl V
55.Op Fl w
56.Op Fl z
57.Ar channel_number
58.Ar address
59.Ar [ bufsize ]
60.Sh DESCRIPTION
61.Nm
62allows one to issue some number of test operations to the
63.Xr ioat 4
64driver on a specific hardware channel.
65The arguments are as follows:
66.Bl -tag -width Ds
67.It Fl c Ar period
68Configure the channel's interrupt coalescing period, in microseconds
69(defaults to 0).
70.It Fl E
71Test contiguous 8k copy.
72.It Fl e
73Test non-contiguous 8k copy.
74.It Fl f
75Test block fill (by default,
76.Nm
77tests copy)
78.It Fl m
79Test memcpy instead of DMA.
80.It Fl V
81Verify copies/fills for accuracy
82.It Fl x
83Test DMA CRC.
84.It Fl X
85Test DMA copy with CRC.
86.It Fl z
87Zero device statistics before running test.
88.El
89.Pp
90Alternatively one can use
91.Nm
92.Fl r
93to issue DMA to or from a specific
94.Ar address .
95The arguments in "raw" mode are:
96.Bl -tag -width Ds
97.It Fl c Ar period
98As above.
99.It Fl v
100.Ar address
101is a kernel virtual address (by default,
102.Ar address
103is assumed to be a physical address)
104.It Fl V
105Verify copies/fills for accuracy
106.It Fl w
107Write to the specified
108.Ar address
109(by default,
110.Nm
111.Fl r
112reads)
113.It Fl z
114As above.
115.El
116.Pp
117.Nm
118operates in one of two modes; if the
119.Ar duration
120argument is passed,
121.Nm
122tries to estimate the copy rate in bytes per second by running
123.Ar num_txns
124repeatedly in loop.
125If
126.Ar duration
127is not passed,
128.Nm
129only runs through
130.Ar num_txns
131once and prints the total bytes copied, as well as error information.
132.Pp
133The
134.Ar bufsize
135argument determines the size of buffers to use for each
136.Fn ioat_copy
137invocation.
138The default is 256 KB.
139In raw mode, the default is 4 KB.
140.Pp
141The
142.Ar chain-len
143argument determines the number of copies to chain together in a single DMA
144transaction.
145The default is 1.
146.Pp
147The
148.Ar duration
149argument specifies an approximate time limit for the test, in milliseconds.
150.Pp
151The test will allocate two chunks of memory for each component of each
152transaction's chain.
153It will initialize them with specific data patterns.
154During the test, it submits DMA requests to copy between pairs of buffers.
155If the
156.Fl V
157flag was specified, it will compare the contents in the callback for a copy
158error.
159.Sh FILES
160.Pa /dev/ioat_test
161.Pp
162The interface between
163.Nm
164and
165.Xr ioat 4 .
166.Xr ioat 4
167exposes it with
168.Cd hw.ioat.enable_ioat_test=1 .
169.Sh DIAGNOSTICS
170The wait channel
171.Va test_submit
172indicates that the test code has enqueued all requested transactions and is
173waiting on the IOAT hardware to complete one before issuing another operation.
174.Sh SEE ALSO
175.Xr ioat 4
176.Sh HISTORY
177The
178.Xr ioat 4
179driver first appeared in
180.Fx 11.0 .
181.Sh AUTHORS
182The
183.Xr ioat 4
184driver and
185.Nm
186tool were developed by
187.An \&Jim Harris Aq Mt jimharris@FreeBSD.org ,
188.An \&Carl Delsey Aq Mt carl.r.delsey@intel.com ,
189and
190.An \&Conrad Meyer Aq Mt cem@FreeBSD.org .
191This manual page was written by
192.An \&Conrad Meyer Aq Mt cem@FreeBSD.org .
193