Commit Graph

5506 Commits

Author SHA1 Message Date
Daniel Verkamp
c028633b50 nvme: assert valid nvme_qpair_construct parameters
Document the assumptions made by qpair_construct using asserts.

These values can't actually be 0 in practice due to the way they are
derived, but scan-build can't see that.  It is also useful to have these
asserts in case of future modifications.

Change-Id: I546c057f5cbe7ccc62acd90b595e423cd450d86a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-22 16:31:26 -07:00
Daniel Verkamp
8217814218 nvme: remove dump_command and dump_completion
nvme_dump_command is totally unused aside from the unit test.

nvme_dump_completion was used in qpair, but it can be replaced with the
equivalent nvme_qpair_print_completion.

Also added the missing nvme_completion fields to nvme_qpair_print_completion
that had been printed by nvme_dump_command.

Change-Id: Ia5ee66f3553df06febe8f465d42e49a84c555dd2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-22 15:48:12 -07:00
Daniel Verkamp
18ce432337 nvme: simplify nvme_ctrlr_construct_admin_qpairs
Remove unnecessary local variables.

Change-Id: Iddcbe24f0a704b6576c9139734258a27a6d272c6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-22 10:12:33 -07:00
Daniel Verkamp
d7dda8ec63 nvme: delete outdated comments about xfer size
This is calculated elsewhere now, so remove the comments around
nvme_qpair_construct calls.

Change-Id: I2dc4956a9e250b88e62038bc55cdd315940ad391
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-22 09:40:53 -07:00
Daniel Verkamp
4f939758ea nvme: remove dead store
rc is reinitialized before it is ever read.

Change-Id: I9abbc256fb06022f3024b0aa3827be02a273f20a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-22 09:39:00 -07:00
Daniel Verkamp
1010fb3af1 SPDK: Initial check-in
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-09-21 08:52:41 -07:00