NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
doca_version.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES, ALL RIGHTS RESERVED.
3  *
4  * This software product is a proprietary product of NVIDIA CORPORATION &
5  * AFFILIATES (the "Company") and all right, title, and interest in and to the
6  * software product, including all associated intellectual property rights, are
7  * and shall remain exclusively with the Company.
8  *
9  * This software product is governed by the End User License Agreement
10  * provided with the software product.
11  *
12  */
13 
24 #ifndef DOCA_VERSION_H_
25 #define DOCA_VERSION_H_
26 
27 #include <stddef.h>
28 
29 #include <doca_compat.h>
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
38 #define DOCA_VERSION_MAJOR 3
42 #define DOCA_VERSION_MINOR 0
46 #define DOCA_VERSION_PATCH 58
50 #define DOCA_VERSION_STRING "3.0.0058"
51 
55 #define DOCA_VERSION_CALC_EXACT(major, minor, patch) ((size_t)((major) << 24 | (minor) << 16 | (patch)))
56 
60 #define DOCA_VERSION_EXACT DOCA_VERSION_CALC_EXACT(DOCA_VERSION_MAJOR, DOCA_VERSION_MINOR, DOCA_VERSION_PATCH)
61 
65 #define DOCA_VERSION_CALC(major, minor, patch) ((size_t)((major) << 24 | (minor) << 16 | (patch * 1000)))
66 
70 #define DOCA_VERSION_OFFICIAL DOCA_VERSION_CALC(DOCA_VERSION_MAJOR, DOCA_VERSION_MINOR, DOCA_VERSION_PATCH)
71 
75 #define DOCA_VERSION_EQ_CURRENT(major, minor, patch) (DOCA_VERSION_CALC(major, minor, patch) == DOCA_VERSION_OFFICIAL)
76 
80 #define DOCA_VERSION_LTE_CURRENT(major, minor, patch) (DOCA_VERSION_CALC(major, minor, patch) <= DOCA_VERSION_OFFICIAL)
81 
90 static inline const char *doca_version(void)
91 {
92  return DOCA_VERSION_STRING;
93 }
94 
104 const char *doca_version_runtime(void);
105 
106 #ifdef __cplusplus
107 } /* extern "C" */
108 #endif
109 
112 #endif /* DOCA_VERSION_H_ */
#define DOCA_EXPERIMENTAL
To set a Symbol (or specifically a function) as experimental.
Definition: doca_compat.h:103
static const char * doca_version(void)
Function returning DOCA's (SDK) exact version string.
Definition: doca_version.h:90
DOCA_EXPERIMENTAL const char * doca_version_runtime(void)
Function returning DOCA's (runtime) exact version string.
#define DOCA_VERSION_STRING
DOCA Version String.
Definition: doca_version.h:50