nvmf: report SPDK version as firmware version

Use the version #defines from spdk/version.h to build a firmware version
string for the virtual NVMe-oF controller model.

Change-Id: I18285cfa75c8915a7db46d4d79c0447392bd5d8c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375252
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Daniel Verkamp 2017-08-22 16:17:41 -07:00
parent 5b4fbce2c7
commit 12ab1e26df

View File

@ -43,13 +43,19 @@
#include "spdk/nvme_spec.h"
#include "spdk/string.h"
#include "spdk/util.h"
#include "spdk/version.h"
#include "spdk_internal/log.h"
#define MIN_KEEP_ALIVE_TIMEOUT 10000
#define MODEL_NUMBER "SPDK bdev Controller"
#define FW_VERSION "FFFFFFFF"
/*
* Report the SPDK version as the firmware revision.
* SPDK_VERSION_STRING won't fit into FR (only 8 bytes), so try to fit the most important parts.
*/
#define FW_VERSION SPDK_VERSION_MAJOR_STRING SPDK_VERSION_MINOR_STRING SPDK_VERSION_PATCH_STRING
static uint16_t spdk_nvmf_ctrlr_gen_cntlid(void);