Lines Matching +full:cmd +full:- +full:timeout +full:- +full:ms

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2019-2021 Netflix, Inc
51 uint32_t timeout; member
89 .timeout = 0,
95 * Argument names and short names selected to match the nvme-cli program
96 * so vendor-siupplied formulas work out of the box on FreeBSD with a simple
120 ARG("data-len", 'l', arg_uint32, opt, data_len,
122 ARG("metadata-len", 'm', arg_uint32, opt, metadata_len,
126 ARG("input-file", 'i', arg_path, opt, ifn,
128 ARG("namespace-id", 'n', arg_uint32, opt, nsid,
134 ARG("timeout", 't', arg_uint32, opt, timeout,
135 "Command timeout (ms)"),
136 ARG("raw-binary", 'b', arg_none, opt, binary,
138 ARG("dry-run", 'd', arg_none, opt, dry_run,
142 ARG("show-command", 's', arg_none, opt, show_command,
150 { arg_string, &opt.dev, "controller-id|namespace-id" },
155 passthru(const struct cmd *f, int argc, char *argv[]) in passthru()
157 int fd = -1, ifd = -1; in passthru()
167 errx(EX_USAGE, "need exactly one of --read or --write"); in passthru()
169 errx(EX_USAGE, "need exactly one of --read or --write"); in passthru()
170 if (*opt.ifn && (ifd = open(opt.ifn, O_RDONLY)) == -1) { in passthru()
217 fprintf(stderr, "timeout_ms : %d\n", opt.timeout); in passthru()
221 warn("Doing a dry-run, no actual I/O"); in passthru()
226 pt.cmd.opc = opt.opcode; in passthru()
227 pt.cmd.fuse = opt.flags; in passthru()
228 pt.cmd.cid = htole16(opt.rsvd); in passthru()
229 pt.cmd.nsid = opt.nsid; /* XXX note: kernel overrides this */ in passthru()
230 pt.cmd.rsvd2 = htole32(opt.cdw2); in passthru()
231 pt.cmd.rsvd3 = htole32(opt.cdw3); in passthru()
232 pt.cmd.cdw10 = htole32(opt.cdw10); in passthru()
233 pt.cmd.cdw11 = htole32(opt.cdw11); in passthru()
234 pt.cmd.cdw12 = htole32(opt.cdw12); in passthru()
235 pt.cmd.cdw13 = htole32(opt.cdw13); in passthru()
236 pt.cmd.cdw14 = htole32(opt.cdw14); in passthru()
237 pt.cmd.cdw15 = htole32(opt.cdw15); in passthru()
258 if (ifd > -1) in passthru()
265 admin_passthru(const struct cmd *nf, int argc, char *argv[]) in admin_passthru()
272 io_passthru(const struct cmd *nf, int argc, char *argv[]) in io_passthru()
278 static struct cmd admin_pass_cmd = {
279 .name = "admin-passthru",
287 static struct cmd io_pass_cmd = {
288 .name = "io-passthru",