aboutsummaryrefslogtreecommitdiff
path: root/sbin/nvmecontrol/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Add a basic test for nvmecontrolDavid Bright2020-04-071-0/+4
| | | | | | | | | | | | | | | | | | | I recently made some bug fixes in nvmecontrol. It occurred to me that since nvmecontrol lacks any kyua tests, I should convert the informal testing I did into a more formal automated test. The test in this change should be considered just a starting point; it is neither complete nor thorough. While converting the test to ATF/kyua, I discovered a small bug in nvmecontrol; the nvmecontrol devlist command would always exit with an unsuccessful status. So I included the fix for that, too, so that the test won't fail. Reviewed by: imp@ MFC after: 3 days Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24269 Notes: svn path=/head/; revision=359717
* Fix mismerge.Warner Losh2019-08-061-1/+1
| | | | | | | | I merged passthru.c from the wrong branch (it was a branch that went further in a direction I wound up not taking). Fix the mismerge and turn passthru on. Notes: svn path=/head/; revision=350652
* Add `nvmecontrol resv` to handle NVMe reservations.Alexander Motin2019-08-051-1/+1
| | | | | | | | | | | | NVMe reservations are quite alike to SCSI persistent reservations and can be used in clustered setups with shared multiport storage. MFC after: 10 days Relnotes: yes Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=350599
* Add `nvmecontrol sanitize` command.Alexander Motin2019-08-031-1/+1
| | | | | | | | | | | | | | | It allows to delete all user data from NVM subsystem in one of 3 methods. It is a close equivalent of SCSI SANITIZE command of `camcontrol sanitize`, so I tried to keep arguments as close as possible. While there, fix supported sanitize methods reporting in `identify`. MFC after: 2 weeks Relnotes: yes Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=350563
* Add IOCTL to translate nvdX into nvmeY and NSID.Alexander Motin2019-08-011-1/+2
| | | | | | | | | | | | | | | While very useful by itself, it also makes `nvmecontrol` not depend on hardcoded device names parsing, that in its turn makes simple to take nvdX (and potentially any other) device names as arguments. Also added IOCTL bypass from nvdX to respective nvmeYnsZ makes them interchangeable for management purposes. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=350523
* Create generic command / arg parsing routinesWarner Losh2019-07-161-2/+5
| | | | | | | | | | | | | | | | | | | | | Create a set of routines and structures to hold the data for the args for a command. Use them to generate help and to parse args. Convert all the current commands over to the new format. "comnd" is a hat-tip to the TOPS-20 %COMND JSYS that (very) loosely inspired much of the subsequent command line notions in the industry, but this is far simpler (the %COMND man page is longer than this code) and not in the kernel... Also, it implements today's de-facto command [verb]+ [opts]* [args]* format rather than the old, archaic TOPS-20 command format :) This is a snapshot of a work in progress to get the nvme passthru stuff committed. In time it will become a private library and used by some other programs in the tree that conform to the above pattern. Differential Revision: https://reviews.freebsd.org/D19296 Notes: svn path=/head/; revision=350057
* Move intel and wdc files to their own modulesWarner Losh2018-12-061-1/+2
| | | | | | | | | | Move the intel and wdc vendor specific stuff to their own modules. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D18460 Notes: svn path=/head/; revision=341659
* Dynamically load .so modules to expand functionalityWarner Losh2018-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | o Dynamically load all the .so files found in /libexec/nvmecontrol and /usr/local/libexec/nvmecontrol. o Link nvmecontrol -rdynamic so that its symbols are visible to the libraries we load. o Create concatinated linker sets that we dynamically expand. o Add the linked-in top and logpage linker sets to the mirrors for them and add those sets to the mirrors when we load a new .so. o Add some macros to help hide the names of the linker sets. o Update the man page. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D18455 fold Notes: svn path=/head/; revision=341657
* Move Intel specific log pages to intel.cWarner Losh2018-12-021-1/+2
| | | | | | | | | | | | Move the Intel specific log pages (including the one that samsung implements) to intel.c. Add comment to the samsung vendor that it will be going away soon. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D18403 Notes: svn path=/head/; revision=341414
* Make it possible to use print_controller from another programWarner Losh2018-06-131-2/+2
| | | | | | | | | | | | | Rename print_controller to nvme_print_controller. Put it in its own file for easy inclusion. Move util.c to be nc_util.c to not conflict with camcontrol. add nvecontrol_ext.h to define shared interfaces. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D15371 Notes: svn path=/head/; revision=335091
* Add NVMe Namespace Management support to nvmecontrol(8).Alexander Motin2018-05-051-1/+1
| | | | | | | | | | | | | This allows create/delete/attach/detach namespaces on new NVMe controllers. This is only a first user-level part of the bigger change set. Kernel part required to detect and handle the configuration changes without reboot is completely independent and will be added separately. Submitted by: Matt Williams <mffbsdw@gmail.com> (original version) Differential Revision: https://reviews.freebsd.org/D11399 Notes: svn path=/head/; revision=333275
* Add `nvmecontrol format` subcommand.Alexander Motin2018-03-131-1/+1
| | | | | | | | | | | It allows to change namespace parameters, such as block size, metadata, protection information, etc. and/or erase the data. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=330826
* Move 128-bit integer routines to util.c so they can be used by moreWarner Losh2017-06-271-1/+1
| | | | | | | | | | than just the log page code. Sponsored by: Netflix, Inc Submitted by: Matt Williams (via D11330) Notes: svn path=/head/; revision=320423
* sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-1/+1
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314656
* Implement 5 wdc-specific nvme control options for their HGST drives:Warner Losh2017-02-041-1/+1
| | | | | | | | | wdc cap-diag Capture diagnostic data from drive wdc drive-log Capture drive history data from drive wdc get-crash-dump Retrieve firmware crash dump from drive Notes: svn path=/head/; revision=313191
* Explicitly add more files to the 'runtime' package.Glen Barber2016-02-091-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295450
* Implement power command to list all power modes, find out the powerWarner Losh2016-01-301-1/+1
| | | | | | | mode we're in and to set the power mode. Notes: svn path=/head/; revision=295087
* Revert r295062 to unbreak buildworldEnji Cooper2016-01-301-1/+1
| | | | | | | | | | | Some of the structures referenced in power.c (in particular struct nvme_power_state) are missing from sbin/nvmecontrol/ Pointyhat to: imp Reported by: Jenkins [*], O. Hartmann <ohartman@zedat.fu-berlin.de>, Outback Dingo <outbackdingo@gmail.com> Notes: svn path=/head/; revision=295076
* Implement power command to list all power modes, find out the powerWarner Losh2016-01-301-1/+1
| | | | | | | mode we're in and to set the power mode. Notes: svn path=/head/; revision=295062
* Add message when nvd disks are attached and detached.Jim Harris2013-07-191-1/+3
| | | | | | | | | | | | | | | As part of this commit, add an nvme_strvis() function which borrows heavily from cam_strvis(). This will allow stripping of leading/trailing whitespace and also handle unprintable characters in model/serial numbers. This function goes into a new nvme_util.c file which is used by both the driver and nvmecontrol. Sponsored by: Intel Reviewed by: carl MFC after: 3 days Notes: svn path=/head/; revision=253476
* Add firmware replacement and activation support to nvmecontrol(8) throughJim Harris2013-06-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | a new firmware command. NVMe controllers may support up to 7 firmware slots for storing of different firmware revisions. This new firmware command supports firmware replacement (i.e. firmware download) with or without immediate activation, or activation of a previously stored firmware image. It also supports selection of the firmware slot during replacement operations, using IDENTIFY information from the controller to check that the specified slot is valid. Newly activated firmware does not take effect until the new controller reset, either via a reboot or separate 'nvmecontrol reset' command to the same controller. Submitted by: Joe Golio <joseph.golio@emc.com> Obtained from: EMC / Isilon Storage Division MFC after: 3 days Notes: svn path=/head/; revision=252278
* Add log page support to nvmecontrol(8) through a new logpage command.Jim Harris2013-06-261-1/+1
| | | | | | | | | | | | | This includes pretty printers for all of the standard NVMe log pages (Error, SMART/Health, Firmware), as well as hex output for non-standard or vendor-specific log pages. Submitted by: Joe Golio <joseph.golio@emc.com> Obtained from: EMC / Isilon Storage Division MFC after: 3 days Notes: svn path=/head/; revision=252277
* Break out code related to the reset command into a separate source file.Jim Harris2013-06-261-1/+1
| | | | | | | | Sponsored by: Intel MFC after: 3 days Notes: svn path=/head/; revision=252268
* Break out code related to the perftest command into a separate file.Jim Harris2013-06-261-1/+1
| | | | | | | | Sponsored by: Intel MFC after: 3 days Notes: svn path=/head/; revision=252267
* Break out code related to the identify command into a separate source file.Jim Harris2013-06-261-1/+1
| | | | | | | | Sponsored by: Intel MFC after: 3 days Notes: svn path=/head/; revision=252266
* Break out code related to the devlist command into a separate source file.Jim Harris2013-06-261-0/+1
| | | | | | | | Sponsored by: Intel MFC after: 3 days Notes: svn path=/head/; revision=252265
* Add nvmecontrol(8) source code and beginnings of a man page to the tree.Jim Harris2012-09-171-0/+6
Sponsored by: Intel Contributions from: Joe Golio/EMC <joseph dot golio at emc dot com> Notes: svn path=/head/; revision=240620