Files
@ bd21c8aa7237
Branch filter:
Location: vmkdrivers/vmkdrivers/src_92/include/vmklinux_9/vmklinux_version.h
bd21c8aa7237
5.0 KiB
text/x-chdr
ESXi-6.0.0b
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | /* **********************************************************
* Copyright 1998, 2010, 2011, 2013 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* vmklinux_version.h --
*
* Version of the vmkernel / vmklinux interface
*/
#ifndef _VMKLINUX26_VERSION_H_
#define _VMKLINUX26_VERSION_H_
#include "buildNumber.h"
/*
* Macro to convert a symbol to a string
*/
#define __VMKLNX_STRINGIFY(sym) #sym
#define VMKLNX_STRINGIFY(sym) __VMKLNX_STRINGIFY(sym)
/*
* Version string fragments.
*/
#define UBAR _
#define DOT .
/*
* "com.vmware.driverAPI" is used both as the name of the API and as the
* name of the various module namespaces.
*
* This string is a well known name that also appears in scons scripts,
* packaging, etc.
*/
#define VMKLNX_API com.vmware.driverAPI
/*
* Macros to glue tokens together.
*
* We use multiple layers of macros to force complete pre-processor expansion.
*/
#define __VMKLNX_MAKE_TOKEN3S(prefix, sep, suffix) \
prefix ## sep ## suffix
#define __VMKLNX_MAKE_TOKEN3(prefix, sep, suffix) \
__VMKLNX_MAKE_TOKEN3S(prefix, sep, suffix)
#define __VMKLNX_MAKE_TOKEN5S(sep, major, minor, update, patch) \
major ## sep ## minor ## sep ## update ## sep ## patch
#define __VMKLNX_VERSION_TOKEN5(sep, major, minor, update, patch) \
__VMKLNX_MAKE_TOKEN5S(sep, major, minor, update, patch)
/*
* Macro to combine major, minor, update, and patch
* version numbers into an integer.
*/
#define VMKLNX_MAKE_VERSION(major,minor,update,patch) \
(((((((major) << 8) | (minor)) << 8) | (update)) << 8) | (patch))
/*
* The MAJOR and MINOR values are exported to the scons script
* bora/scons/modules/vmkDrivers.sc. If you change the name
* of the two macros below, you need to change vmkDrivers.sc
* as well.
*/
#define VMKLNX_DDI_VERSION_MAJOR 9
#define VMKLNX_DDI_VERSION_MINOR 2
#define VMKLNX_DDI_VERSION_UPDATE 3
#define VMKLNX_DDI_VERSION_PATCH 0
#define __VMKLNX_VERSION_TOKEN_D \
__VMKLNX_VERSION_TOKEN5(DOT, \
VMKLNX_DDI_VERSION_MAJOR, \
VMKLNX_DDI_VERSION_MINOR, \
VMKLNX_DDI_VERSION_UPDATE, \
VMKLNX_DDI_VERSION_PATCH)
#define __VMKLNX_VERSION_TOKEN_U \
__VMKLNX_VERSION_TOKEN5(UBAR, \
VMKLNX_DDI_VERSION_MAJOR, \
VMKLNX_DDI_VERSION_MINOR, \
VMKLNX_DDI_VERSION_UPDATE, \
VMKLNX_DDI_VERSION_PATCH)
/*
* Name space support:
* Both vmklinux and the shim export a namespace called "com.vmware.driverAPI".
* The difference is in the version number. The version for vmklinux is
* given by just the major number, whereas the shims use all four numbers
* separated by dots.
*/
#define VMKLINUX_NAMESPACE VMKLNX_STRINGIFY(VMKLNX_API)
#define VMKLNX_NS_CURRENT_VERSION VMKLNX_STRINGIFY(__VMKLNX_VERSION_TOKEN_D)
#define VMKLNX_DDI_VERSION \
VMKLNX_MAKE_VERSION(VMKLNX_DDI_VERSION_MAJOR, \
VMKLNX_DDI_VERSION_MINOR, \
VMKLNX_DDI_VERSION_UPDATE, \
VMKLNX_DDI_VERSION_PATCH)
/*
* Driver namespace definitions are found in the scons defineVmkDriver()
* build rule. We always use the two digit variant for drivers
* (e.g. '9.2" for the version). This is done because drivers have no
* shims for update or patch releases.
*
* The implication for drivers: Any driver exporting an interface to
* other drivers must maintain strict backwards binary compatibilty
* in an update or patch release.
*/
#define __VMKDRV_VERSION_TOKEN_D \
__VMKLNX_MAKE_TOKEN3(VMKLNX_DDI_VERSION_MAJOR, \
DOT, \
VMKLNX_DDI_VERSION_MINOR)
#define VMKDRV_NS_CURRENT_VERSION VMKLNX_STRINGIFY(__VMKDRV_VERSION_TOKEN_D)
#define VMKLNX_DDI_VERSION_STR VMKDRV_NS_CURRENT_VERSION
#define VMKDRV_NAMESPACE_PROVIDES(ns) \
VMK_NAMESPACE_PROVIDES(VMKLNX_STRINGIFY(ns), VMKDRV_NS_CURRENT_VERSION);
#define VMKDRV_NAMESPACE_REQUIRED(ns) \
VMK_NAMESPACE_REQUIRED(VMKLNX_STRINGIFY(ns), VMKDRV_NS_CURRENT_VERSION);
/*
* This macro is used to created different names in the various thin vmklinux
* modules (e.g. log channels and mempool names). For vmklinux_9, we do
* nothing. Other version of vmklinux need to modify the name to avoid
* conflict.
*/
#define VMKLNX_MODIFY_NAME(name) \
VMKLNX_STRINGIFY(name)
#endif // _VMKLINUX_VERSION_DIST_H_
|