Lines Matching refs:t
70 main_raw(struct ioat_test *t, int argc, char **argv) in main_raw() argument
75 t->testkind = IOAT_TEST_RAW_DMA; in main_raw()
76 t->transactions = 1; in main_raw()
77 t->chain_depth = 1; in main_raw()
78 t->buffer_size = 4 * 1024; in main_raw()
80 t->raw_target = strtoull(argv[1], NULL, 0); in main_raw()
81 if (t->raw_target == 0) { in main_raw()
87 t->buffer_size = atoi(argv[2]); in main_raw()
88 if (t->buffer_size == 0) { in main_raw()
100 (void)ioctl(fd, IOAT_DMATEST, t); in main_raw()
103 exit(prettyprint(t)); in main_raw()
109 struct ioat_test t; in main() local
114 memset(&t, 0, sizeof(t)); in main()
122 t.coalesce_period = atoi(optarg); in main()
145 t.raw_is_virtual = true; in main()
148 t.verify = true; in main()
151 t.raw_write = true; in main()
162 t.zero_stats = true; in main()
180 t.buffer_size = 256 * 1024; in main()
181 t.chain_depth = 2; in main()
182 t.duration = 0; in main()
183 t.testkind = IOAT_TEST_DMA; in main()
186 t.testkind = IOAT_TEST_FILL; in main()
188 t.testkind = IOAT_TEST_DMA_8K; in main()
189 t.buffer_size = 8 * 1024; in main()
191 t.testkind = IOAT_TEST_MEMCPY; in main()
193 t.testkind = IOAT_TEST_DMA_CRC; in main()
195 t.testkind = IOAT_TEST_DMA_CRC_COPY; in main()
197 t.channel_index = atoi(argv[0]); in main()
198 if (t.channel_index > 8) { in main()
204 main_raw(&t, argc, argv); in main()
208 t.transactions = atoi(argv[1]); in main()
211 t.buffer_size = atoi(argv[2]); in main()
212 if (t.buffer_size == 0) { in main()
219 t.chain_depth = atoi(argv[3]); in main()
220 if (t.chain_depth < 1) { in main()
227 t.duration = atoi(argv[4]); in main()
228 if (t.duration < 1) { in main()
240 (void)ioctl(fd, IOAT_DMATEST, &t); in main()
243 return (prettyprint(&t)); in main()
247 prettyprint(struct ioat_test *t) in prettyprint() argument
252 if (t->status[IOAT_TEST_NO_DMA_ENGINE] != 0 || in prettyprint()
253 t->status[IOAT_TEST_NO_MEMORY] != 0 || in prettyprint()
254 t->status[IOAT_TEST_MISCOMPARE] != 0) { in prettyprint()
256 if (t->status[IOAT_TEST_NO_DMA_ENGINE] != 0) in prettyprint()
258 (unsigned)t->status[IOAT_TEST_NO_DMA_ENGINE]); in prettyprint()
259 if (t->status[IOAT_TEST_NO_MEMORY] != 0) in prettyprint()
261 (unsigned)t->status[IOAT_TEST_NO_MEMORY]); in prettyprint()
262 if (t->status[IOAT_TEST_MISCOMPARE] != 0) in prettyprint()
264 (unsigned)t->status[IOAT_TEST_MISCOMPARE]); in prettyprint()
267 printf("Processed %u txns\n", (unsigned)t->status[IOAT_TEST_OK] / in prettyprint()
268 t->chain_depth); in prettyprint()
269 bytes = (uintmax_t)t->buffer_size * t->status[IOAT_TEST_OK]; in prettyprint()
273 if (t->duration) { in prettyprint()
275 (int64_t)1000 * bytes / t->duration, "B/s", HN_AUTOSCALE, in prettyprint()
278 (unsigned)t->duration, bps); in prettyprint()