2017-06-09 22:16:18 +00:00
|
|
|
/*-
|
|
|
|
* BSD LICENSE
|
|
|
|
*
|
2019-11-12 14:00:53 +00:00
|
|
|
* Copyright (c) Intel Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2019 Mellanox Technologies LTD. All rights reserved.
|
2017-06-09 22:16:18 +00:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* * Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* * Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* * Neither the name of Intel Corporation nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
* SPDK version number definitions
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SPDK_VERSION_H
|
|
|
|
#define SPDK_VERSION_H
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Major version number (year of original release minus 2000).
|
|
|
|
*/
|
2020-10-23 09:28:00 +00:00
|
|
|
#define SPDK_VERSION_MAJOR 21
|
2017-06-09 22:16:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Minor version number (month of original release).
|
|
|
|
*/
|
2021-01-22 11:12:48 +00:00
|
|
|
#define SPDK_VERSION_MINOR 4
|
2017-06-09 22:16:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Patch level.
|
|
|
|
*
|
|
|
|
* Patch level is incremented on maintenance branch releases and reset to 0 for each
|
|
|
|
* new major.minor release.
|
|
|
|
*/
|
2021-04-29 07:51:11 +00:00
|
|
|
#define SPDK_VERSION_PATCH 1
|
2017-06-09 22:16:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Version string suffix.
|
|
|
|
*/
|
2021-04-29 07:51:11 +00:00
|
|
|
#define SPDK_VERSION_SUFFIX "-pre"
|
2017-06-09 22:16:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Single numeric value representing a version number for compile-time comparisons.
|
|
|
|
*
|
|
|
|
* Example usage:
|
|
|
|
*
|
|
|
|
* \code
|
|
|
|
* #if SPDK_VERSION >= SPDK_VERSION_NUM(17, 7, 0)
|
2018-10-30 00:02:42 +00:00
|
|
|
* Use feature from SPDK v17.07
|
2017-06-09 22:16:18 +00:00
|
|
|
* #endif
|
|
|
|
* \endcode
|
|
|
|
*/
|
|
|
|
#define SPDK_VERSION_NUM(major, minor, patch) \
|
|
|
|
(((major) * 100 + (minor)) * 100 + (patch))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Current version as a SPDK_VERSION_NUM.
|
|
|
|
*/
|
|
|
|
#define SPDK_VERSION SPDK_VERSION_NUM(SPDK_VERSION_MAJOR, SPDK_VERSION_MINOR, SPDK_VERSION_PATCH)
|
|
|
|
|
|
|
|
#define SPDK_VERSION_STRINGIFY_x(x) #x
|
|
|
|
#define SPDK_VERSION_STRINGIFY(x) SPDK_VERSION_STRINGIFY_x(x)
|
|
|
|
|
|
|
|
#define SPDK_VERSION_MAJOR_STRING SPDK_VERSION_STRINGIFY(SPDK_VERSION_MAJOR)
|
|
|
|
|
|
|
|
#if SPDK_VERSION_MINOR < 10
|
|
|
|
#define SPDK_VERSION_MINOR_STRING ".0" SPDK_VERSION_STRINGIFY(SPDK_VERSION_MINOR)
|
|
|
|
#else
|
|
|
|
#define SPDK_VERSION_MINOR_STRING "." SPDK_VERSION_STRINGIFY(SPDK_VERSION_MINOR)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if SPDK_VERSION_PATCH != 0
|
|
|
|
#define SPDK_VERSION_PATCH_STRING "." SPDK_VERSION_STRINGIFY(SPDK_VERSION_PATCH)
|
|
|
|
#else
|
|
|
|
#define SPDK_VERSION_PATCH_STRING ""
|
|
|
|
#endif
|
|
|
|
|
2019-11-12 14:00:53 +00:00
|
|
|
#ifdef SPDK_GIT_COMMIT
|
|
|
|
#define SPDK_GIT_COMMIT_STRING SPDK_VERSION_STRINGIFY(SPDK_GIT_COMMIT)
|
|
|
|
#define SPDK_GIT_COMMIT_STRING_SHA1 " git sha1 " SPDK_GIT_COMMIT_STRING
|
|
|
|
#else
|
|
|
|
#define SPDK_GIT_COMMIT_STRING ""
|
|
|
|
#define SPDK_GIT_COMMIT_STRING_SHA1 ""
|
|
|
|
#endif
|
|
|
|
|
2017-06-09 22:16:18 +00:00
|
|
|
/**
|
|
|
|
* Human-readable version string.
|
|
|
|
*/
|
|
|
|
#define SPDK_VERSION_STRING \
|
2017-08-31 18:18:26 +00:00
|
|
|
"SPDK v" \
|
2017-06-09 22:16:18 +00:00
|
|
|
SPDK_VERSION_MAJOR_STRING \
|
|
|
|
SPDK_VERSION_MINOR_STRING \
|
|
|
|
SPDK_VERSION_PATCH_STRING \
|
2019-11-12 14:00:53 +00:00
|
|
|
SPDK_VERSION_SUFFIX \
|
|
|
|
SPDK_GIT_COMMIT_STRING_SHA1
|
2017-06-09 22:16:18 +00:00
|
|
|
|
|
|
|
#endif
|