]> www.infradead.org Git - users/sagi/nvme-cli.git/log
users/sagi/nvme-cli.git
10 years agoRemove html install target
Keith Busch [Wed, 3 Jun 2015 21:38:02 +0000 (15:38 -0600)]
Remove html install target

Not meant to be installed at this time. This previously polluted '/'
with undesriable (but harmless) artifacts.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoMerge branch 'master' of https://github.com/linux-nvme/nvme-cli
Stephen Bates [Tue, 2 Jun 2015 15:32:13 +0000 (09:32 -0600)]
Merge branch 'master' of https://github.com/linux-nvme/nvme-cli

10 years agoReverted to GPL licensing
Stephen Bates [Tue, 2 Jun 2015 15:27:54 +0000 (09:27 -0600)]
Reverted to GPL licensing

Mixed licensing is not distributable. Based on this and on discussions
between Stephen, Keith and various legal people we are aligning with
GPL.

10 years agoMerge branch 'master' of https://github.com/linux-nvme/nvme-cli
Keith Busch [Fri, 29 May 2015 15:32:56 +0000 (09:32 -0600)]
Merge branch 'master' of https://github.com/linux-nvme/nvme-cli

10 years agoRemove build artifact
Keith Busch [Fri, 29 May 2015 15:32:32 +0000 (09:32 -0600)]
Remove build artifact

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoAdd html documentation
Keith Busch [Fri, 29 May 2015 15:31:48 +0000 (09:31 -0600)]
Add html documentation

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoMerge pull request #13 from stevegalbraith/master
keithbusch [Thu, 28 May 2015 15:59:33 +0000 (09:59 -0600)]
Merge pull request #13 from stevegalbraith/master

Found another instance of flbas being used as an index into list_item.

10 years agoFound another instance of flbas being used as an index.
stevegalbraith [Wed, 27 May 2015 18:20:08 +0000 (11:20 -0700)]
Found another instance of flbas being used as an index.
Same fix was applied as in pull request #12.

10 years agoMerge pull request #12 from stevegalbraith/master
keithbusch [Wed, 27 May 2015 16:50:14 +0000 (10:50 -0600)]
Merge pull request #12 from stevegalbraith/master

Fix to determine initial value for lba in print_list_item

Thanks, LGTM.

10 years agoFix to determine initial value for lba in print_list_item
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.

10 years agoUpdated licensing
Stephen Bates [Fri, 15 May 2015 18:53:09 +0000 (18:53 +0000)]
Updated licensing

Added the GPL license to cover the nvme.h file and moved both licenses
into a new sub-folder.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoMerge pull request #11 from jderrick/master
keithbusch [Tue, 12 May 2015 19:49:39 +0000 (13:49 -0600)]
Merge pull request #11 from jderrick/master

Human-readable decode for id-ctrl and id-ns

LGTM

10 years agoAdded a human-readable format option to id-ctrl and id-ns. This will
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>
10 years agoFix f/w download
Keith Busch [Mon, 11 May 2015 20:44:05 +0000 (14:44 -0600)]
Fix f/w download

This needs to read the image file into it's buffer for this to work
correctly, and use an appropriate default transfer size.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoMinor typos in two man pages
Stephen Bates [Fri, 8 May 2015 12:07:41 +0000 (12:07 +0000)]
Minor typos in two man pages

10 years agoCut and paste fix
Stephen Bates [Fri, 1 May 2015 22:40:54 +0000 (16:40 -0600)]
Cut and paste fix

Fixes a cut and paste error in the passthru command.

10 years agoSwitch license from GPLv2 to Apache
Keith Busch [Fri, 1 May 2015 22:32:57 +0000 (16:32 -0600)]
Switch license from GPLv2 to Apache

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
10 years agoMerge pull request #8 from zevweiss/master
keithbusch [Fri, 24 Apr 2015 00:16:50 +0000 (18:16 -0600)]
Merge pull request #8 from zevweiss/master

Compile with -std=gnu99.

10 years agoCompile with -std=gnu99.
Zev Weiss [Fri, 24 Apr 2015 00:10:00 +0000 (19:10 -0500)]
Compile with -std=gnu99.

struct nvme_command contains an anonymous union (a GNU extension).

10 years agoMerge pull request #7 from zevweiss/master
keithbusch [Fri, 24 Apr 2015 00:07:38 +0000 (18:07 -0600)]
Merge pull request #7 from zevweiss/master

Fix over-long loop in show_fw_log().

10 years agoFix over-long loop in show_fw_log().
Zev Weiss [Fri, 24 Apr 2015 00:02:38 +0000 (19:02 -0500)]
Fix over-long loop in show_fw_log().

nvme_firmware_log_page.frs has 7 entries, not 8.

10 years agoRegister read fix for kernel 4.0
Keith Busch [Mon, 6 Apr 2015 20:31:09 +0000 (14:31 -0600)]
Register read fix for kernel 4.0

The nvme sysfs path was moved in kernel 4.0 to a new class type, so just
opening that one first before falling back to the previous location.

This also is printing an error if the user requested an invalid command.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoAdd data input option for set features
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>
10 years agoImproved Makefile to use kernel uapi header.
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.

10 years agoFixed versioning for pre 1.2 devices
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.

10 years agoImproved text display for nvme list command.
Stephen Bates [Fri, 13 Mar 2015 15:45:44 +0000 (09:45 -0600)]
Improved text display for nvme list command.

10 years agoFixed whitespace damage.
Stephen Bates [Wed, 11 Mar 2015 17:02:41 +0000 (11:02 -0600)]
Fixed whitespace damage.

10 years agoFixed formatting
Stephen Bates [Fri, 27 Feb 2015 00:59:09 +0000 (00:59 +0000)]
Fixed formatting

10 years agoMajor improvements in list output
Stephen Bates [Fri, 27 Feb 2015 00:34:45 +0000 (00:34 +0000)]
Major improvements in list output

Added improved output processing of the nvme list command. Improved
formatting and added fields for the output.

10 years agoBug fix for command line processing
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.

10 years agoFix format command required arguments
Keith Busch [Thu, 26 Feb 2015 15:34:14 +0000 (08:34 -0700)]
Fix format command required arguments

The documentation says these take arguments, but providing one resulted
in a segmentation fault. Chaning these to require an argument fixes
the issue.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoMerge pull request #6 from davidsariel/master
keithbusch [Thu, 26 Feb 2015 15:49:38 +0000 (08:49 -0700)]
Merge pull request #6 from davidsariel/master

according to chapter 5.10.1.3 of the nvme v 1.2 the size of the frs fiel...

10 years agoaccording to chapter 5.10.1.3 of the nvme v 1.2 the size of the frs field of the...
David Sariel [Thu, 26 Feb 2015 10:35:09 +0000 (12:35 +0200)]
according to chapter 5.10.1.3 of the nvme v 1.2 the size of the frs field of the struct nvme_firmware_log_page has to be 7

10 years agoFix for latency test
Stephen Bates [Fri, 20 Feb 2015 21:07:23 +0000 (14:07 -0700)]
Fix for latency test

Added a -f so we don't barf if the OUTPUT file is missing.

10 years agoImproved command line support
Stephen Bates [Thu, 12 Feb 2015 13:24:16 +0000 (13:24 +0000)]
Improved command line support

Converted nvme.c to use argconfig. This provides improved command line
support and suffix support (e.g. 4k, 1M).

10 years agoUpdate README.md
keithbusch [Wed, 11 Feb 2015 03:22:53 +0000 (20:22 -0700)]
Update README.md

Adding the most basic information to get started.

10 years agoAdded a latency capture tool
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.

10 years agoImproved regression script
Stephen Bates [Mon, 9 Feb 2015 18:34:45 +0000 (18:34 +0000)]
Improved regression script

Added a more complete set of regressions and the ability to not write
to the test device.

10 years agoAdded metadata buffer to submit_io
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.

10 years agoFixed indentation
Stephen Bates [Mon, 9 Feb 2015 16:03:59 +0000 (16:03 +0000)]
Fixed indentation

Corrected the indentation of the nvme-list functions to be consistent
with the Linux coding style.

10 years agoAdded latency measurements to submit_io commands
Stephen Bates [Mon, 9 Feb 2015 15:58:58 +0000 (15:58 +0000)]
Added latency measurements to submit_io commands

Added a --latency (it) option to display the latency of a submit_io
IOCTL command. The results are displayed in micro-seconds.

10 years agoPoint man page to the new official repo.
Keith Busch [Mon, 9 Feb 2015 15:34:41 +0000 (08:34 -0700)]
Point man page to the new official repo.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoMerge pull request #1 from MatiasBjorling/master
keithbusch [Mon, 9 Feb 2015 15:07:08 +0000 (08:07 -0700)]
Merge pull request #1 from MatiasBjorling/master

Fixes to make it compile

10 years agoNVMe: Fix compile errors
Matias Bjørling [Mon, 9 Feb 2015 09:33:08 +0000 (10:33 +0100)]
NVMe: Fix compile errors

A missing = when setting NVME_RW_FUA and the open() function requires
that permission flags are passed when O_CREAT is used in flag.

10 years agoNVMe: Pass linker flags at the end
Matias Bjørling [Mon, 9 Feb 2015 09:31:40 +0000 (10:31 +0100)]
NVMe: Pass linker flags at the end

Linker flags must be passed after the object have been compiled. Else
the compiler won't know they should be linked in to the nvme.o object
file.

10 years agoNVMe: -m64 is not a linker command
Matias Bjørling [Mon, 9 Feb 2015 09:16:15 +0000 (10:16 +0100)]
NVMe: -m64 is not a linker command

No need for pass -m64 to the linker, as this is for the compiler.

10 years agoAdded nvme-list command.
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.

10 years agoRegression and improvements to nvme-read and nvme-write
Stephen Bates [Sat, 7 Feb 2015 03:52:24 +0000 (03:52 +0000)]
Regression and improvements to nvme-read and nvme-write

Added a short pass/fail regression for commit testing. Added the
ability to show and dry-run submit_io commands.

10 years agoAdded dry-run (-d) option to nvme-io-passthru
Stephen Bates [Sat, 7 Feb 2015 02:48:33 +0000 (02:48 +0000)]
Added dry-run (-d) option to nvme-io-passthru

Added the option to dry-run the nvme-io-passthru command. Use with the
show option. The plan is to add this to other commands in due course.

10 years agoCreate LICENSE
keithbusch [Thu, 5 Feb 2015 23:38:40 +0000 (16:38 -0700)]
Create LICENSE

10 years agoCreate README.md
keithbusch [Thu, 5 Feb 2015 23:00:24 +0000 (16:00 -0700)]
Create README.md

10 years agoAdd 1.2 features to identify and show results
Keith Busch [Thu, 5 Feb 2015 22:16:07 +0000 (15:16 -0700)]
Add 1.2 features to identify and show results

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoFix identifier collision on macro expansion
Keith Busch [Thu, 5 Feb 2015 21:42:28 +0000 (14:42 -0700)]
Fix identifier collision on macro expansion

READ may already by a defined macro, which will cause compilation
errors. Use a less generic name.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agogit add missing files
Keith Busch [Wed, 4 Feb 2015 22:38:10 +0000 (15:38 -0700)]
git add missing files

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Provide easy read and write commands
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>
10 years agoNVMe: Add top level man page
Keith Busch [Tue, 3 Feb 2015 22:18:36 +0000 (15:18 -0700)]
NVMe: Add top level man page

Man pages were provided for the sub-commands, but none for the nvme
program itself. Not particularly well documented, but it's there now.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add install target and man pages
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>
10 years agoNVMe: Add show registers command
Keith Busch [Mon, 2 Feb 2015 16:57:49 +0000 (09:57 -0700)]
NVMe: Add show registers command

This prints out the controller registers in human readable format. It uses
knowledge of the sysfs layout to map a character device to a pci resource.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Format handling
Keith Busch [Fri, 30 Jan 2015 17:17:43 +0000 (10:17 -0700)]
NVMe: Format handling

Fix the print on format success, and enforce block namespace id usage
when opening block handles.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add compare command support
Keith Busch [Sat, 6 Dec 2014 00:16:45 +0000 (17:16 -0700)]
NVMe: Add compare command support

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add io-passthru support
Keith Busch [Wed, 3 Dec 2014 16:48:05 +0000 (09:48 -0700)]
NVMe: Add io-passthru support

It's identical to the admin passthrough.

This and others like flush and reservations are dependent on the driver
commit:

  | commit 390a2cf648df2d9bbd43462cb2f62fb00fb612d9
  | Author: Keith Busch <keith.busch@intel.com>
  | Date:   Fri Sep 12 16:07:20 2014 -0600
  |
  |     NVMe: Passthrough IOCTL for IO commands

You'll just get an error for an unknown ioctl otherwise.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add support for Flush command
Keith Busch [Tue, 2 Dec 2014 20:31:09 +0000 (13:31 -0700)]
NVMe: Add support for Flush command

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add support for get feature's SEL field.
Keith Busch [Mon, 1 Dec 2014 21:47:27 +0000 (14:47 -0700)]
NVMe: Add support for get feature's SEL field.

Added in the 1.1 specification.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Fixing typos
Keith Busch [Mon, 1 Dec 2014 21:38:47 +0000 (14:38 -0700)]
NVMe: Fixing typos

Fixing typos propogated from copy-paste from help and documentation.

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add support for identify namespace list
Keith Busch [Mon, 1 Dec 2014 21:15:16 +0000 (14:15 -0700)]
NVMe: Add support for identify namespace list

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add reservation support
Keith Busch [Mon, 1 Dec 2014 20:51:11 +0000 (13:51 -0700)]
NVMe: Add reservation support

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add security send/receive support
Keith Busch [Mon, 1 Dec 2014 19:00:22 +0000 (12:00 -0700)]
NVMe: Add security send/receive support

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Add additional help documentation
Keith Busch [Mon, 1 Dec 2014 17:31:47 +0000 (10:31 -0700)]
NVMe: Add additional help documentation

Added:

fw-download
fw-activate
format
io-passthru

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoadd: .gitignore
Keith Busch [Mon, 1 Dec 2014 15:48:07 +0000 (08:48 -0700)]
add: .gitignore

Signed-off-by: Keith Busch <keith.busch@intel.com>
10 years agoNVMe: Initial commit for cli program
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>