NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
DOCA Version Management

Macros

#define DOCA_VERSION_MAJOR   3
 Major version number 0-255. More...
 
#define DOCA_VERSION_MINOR   0
 Minor version number 0-255. More...
 
#define DOCA_VERSION_PATCH   58
 Patch version number 0-9999. More...
 
#define DOCA_VERSION_STRING   "3.0.0058"
 DOCA Version String. More...
 
#define DOCA_VERSION_CALC_EXACT(major, minor, patch)   ((size_t)((major) << 24 | (minor) << 16 | (patch)))
 Macro to calculate exact version number for comparisons. More...
 
#define DOCA_VERSION_EXACT   DOCA_VERSION_CALC_EXACT(DOCA_VERSION_MAJOR, DOCA_VERSION_MINOR, DOCA_VERSION_PATCH)
 Macro of current exact version number. More...
 
#define DOCA_VERSION_CALC(major, minor, patch)   ((size_t)((major) << 24 | (minor) << 16 | (patch * 1000)))
 Macro to calculate official version number for comparisons. More...
 
#define DOCA_VERSION_OFFICIAL   DOCA_VERSION_CALC(DOCA_VERSION_MAJOR, DOCA_VERSION_MINOR, DOCA_VERSION_PATCH)
 Macro of current official version number. More...
 
#define DOCA_VERSION_EQ_CURRENT(major, minor, patch)   (DOCA_VERSION_CALC(major, minor, patch) == DOCA_VERSION_OFFICIAL)
 Check if the specified version is equal to the current official version. More...
 
#define DOCA_VERSION_LTE_CURRENT(major, minor, patch)   (DOCA_VERSION_CALC(major, minor, patch) <= DOCA_VERSION_OFFICIAL)
 Check if the specified version is less then or equal to current official version. More...
 

Functions

static const char * doca_version (void)
 Function returning DOCA's (SDK) exact version string. More...
 
DOCA_EXPERIMENTAL const char * doca_version_runtime (void)
 Function returning DOCA's (runtime) exact version string. More...
 

Detailed Description

Define functions to get the DOCA version, and compare against it.

Macro Definition Documentation

◆ DOCA_VERSION_CALC

#define DOCA_VERSION_CALC (   major,
  minor,
  patch 
)    ((size_t)((major) << 24 | (minor) << 16 | (patch * 1000)))

Macro to calculate official version number for comparisons.

Definition at line 65 of file doca_version.h.

◆ DOCA_VERSION_CALC_EXACT

#define DOCA_VERSION_CALC_EXACT (   major,
  minor,
  patch 
)    ((size_t)((major) << 24 | (minor) << 16 | (patch)))

Macro to calculate exact version number for comparisons.

Definition at line 55 of file doca_version.h.

◆ DOCA_VERSION_EQ_CURRENT

#define DOCA_VERSION_EQ_CURRENT (   major,
  minor,
  patch 
)    (DOCA_VERSION_CALC(major, minor, patch) == DOCA_VERSION_OFFICIAL)

Check if the specified version is equal to the current official version.

Definition at line 75 of file doca_version.h.

◆ DOCA_VERSION_EXACT

Macro of current exact version number.

Definition at line 60 of file doca_version.h.

◆ DOCA_VERSION_LTE_CURRENT

#define DOCA_VERSION_LTE_CURRENT (   major,
  minor,
  patch 
)    (DOCA_VERSION_CALC(major, minor, patch) <= DOCA_VERSION_OFFICIAL)

Check if the specified version is less then or equal to current official version.

Definition at line 80 of file doca_version.h.

◆ DOCA_VERSION_MAJOR

#define DOCA_VERSION_MAJOR   3

Major version number 0-255.

Definition at line 38 of file doca_version.h.

◆ DOCA_VERSION_MINOR

#define DOCA_VERSION_MINOR   0

Minor version number 0-255.

Definition at line 42 of file doca_version.h.

◆ DOCA_VERSION_OFFICIAL

Macro of current official version number.

Definition at line 70 of file doca_version.h.

◆ DOCA_VERSION_PATCH

#define DOCA_VERSION_PATCH   58

Patch version number 0-9999.

Definition at line 46 of file doca_version.h.

◆ DOCA_VERSION_STRING

#define DOCA_VERSION_STRING   "3.0.0058"

DOCA Version String.

Definition at line 50 of file doca_version.h.

Function Documentation

◆ doca_version()

static const char* doca_version ( void  )
inlinestatic

Function returning DOCA's (SDK) exact version string.

Returns
version string, using the format major.minor.patch.
Note
Represents the SDK version a project was compiled with.

Definition at line 90 of file doca_version.h.

◆ doca_version_runtime()

DOCA_EXPERIMENTAL const char* doca_version_runtime ( void  )

Function returning DOCA's (runtime) exact version string.

Returns
version string, using the format major.minor.patch.
Note
Represents the runtime version a project is linked against.