stevegalbraith [Wed, 27 May 2015 16:36:38 +0000 (09:36 -0700)]
Fix to determine initial value for lba in print_list_item
The index used to determine lba value takes into accout the entire FLBAS field. Bit 4 determines whether an extended or separate is used to send metadata and if set to 1'b,
throws off the index value. Masked out the top 4 bits to only take into account Bits 3:0 which indicate the LBA format type used.
Jon Derrick [Tue, 12 May 2015 16:09:04 +0000 (10:09 -0600)]
Added a human-readable format option to id-ctrl and id-ns. This will
partially decode several relevant bitfields in the ID Controller and
Namespace commands. Reserved fields are displayed if not 0.
Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Keith Busch [Fri, 20 Mar 2015 15:13:50 +0000 (09:13 -0600)]
Add data input option for set features
Some NVMe features perform a data transfer and this provides a user option
to specify where that data comes from when setting. Documentation updated
as well.
This also includes an unrelated fix to hush a warning for unused symbols
under precompile libudev dependencies.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Stephen Bates [Sun, 15 Mar 2015 22:41:41 +0000 (16:41 -0600)]
Improved Makefile to use kernel uapi header.
Until now the CLI has relied on the header in the local Linux folder.
This is not safe as the kernel header may have differences that can
cause severe issues (e.g. new/different structure members). This
commit tries to use the uapi for the current kernel. Note this only
fixes at compile time.
Stephen Bates [Fri, 13 Mar 2015 19:24:47 +0000 (13:24 -0600)]
Fixed versioning for pre 1.2 devices
Prior to NVMe 1.2 there was no version field in controller ID and the
version had to come from the BAR register. This change ensures the
version is obtained from the right place for all devices.
Stephen Bates [Thu, 26 Feb 2015 17:15:27 +0000 (17:15 +0000)]
Bug fix for command line processing
In quite a few places we declared no_argument options with !CFG_NONE
causing the porgram to segfault when those options were passed
in. Improved regression to try and prevent this in future.
Stephen Bates [Tue, 10 Feb 2015 16:54:03 +0000 (09:54 -0700)]
Added a latency capture tool
Added a simple shell script that calls nvme read or nme write a number
of times and captures latency information for post-processing. Later
we will run this over random LBAs on the drive and probably move to a
tools sub-folder.
Stephen Bates [Mon, 9 Feb 2015 16:52:07 +0000 (16:52 +0000)]
Added metadata buffer to submit_io
In order to get IOCTLs to compete sucessfullly on many real drives we
need to provide a meta-data buffer on read and write. This commit
allows that to be added using a --metadata-size option. On writes the
metadata is obtained from the end of the --data file.
Stephen Bates [Mon, 9 Feb 2015 04:16:39 +0000 (04:16 +0000)]
Added nvme-list command.
Added an new command called nvme-list which uses libudev to look for
NVM Express devices. It prints the /dev node for any detected devices
as well as some other summary information.
For now we use a Makefile hack to alter the build if libudev is not
installed. At a later date we could switch to autoconf and
./configure.
Keith Busch [Wed, 4 Feb 2015 17:36:49 +0000 (10:36 -0700)]
NVMe: Provide easy read and write commands
This adds convienience functions for read and write. They are similar
to compare in that they use the helpful NVME_SUBMIT_IO IOCTL instead of
the passthru version that requires more setup.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Mon, 2 Feb 2015 18:10:41 +0000 (11:10 -0700)]
NVMe: Add install target and man pages
This adds an install target, hard-coded to /usr/local/. Feel free to
propose a more correct way to do an install.
Lots of people tell me they don't have asciidoc, so they get only errors
when compiling the documenation. As such, I added the generated man pages
to the repo and made building documenation its own make target separate
from default. You can invoke "make all" or "make doc".
The only way to get to the help contents is to run "make install" now,
but it at least works correctly when you are not running nvme from the
directory you built it, so it's a step in the right direction.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Keith Busch [Wed, 26 Nov 2014 20:44:30 +0000 (13:44 -0700)]
NVMe: Initial commit for cli program
This is a combined nvme user space program for all commands into a single
program. Usage was inspired by 'git'. Run 'nvme help' to see what commands
are available, and 'nvme help <cmd>' for detailed usage.
Some documentation is missing or partially completed, but I wanted to
get this on a public repo before leaving for holiday.
Signed-off-by: Keith Busch <keith.busch@intel.com>