version: 1.6.0r2
[dpdk.git] / lib / librte_eal / common / include / rte_version.h
index c101a21..419de24 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
@@ -59,12 +59,31 @@ extern "C" {
 /**
  * Minor version number i.e. the y in x.y.z
  */
-#define RTE_VER_MINOR 5
+#define RTE_VER_MINOR 6
 
 /**
  * Patch level number i.e. the z in x.y.z
  */
-#define RTE_VER_PATCH_LEVEL 1
+#define RTE_VER_PATCH_LEVEL 0
+
+/**
+ * Patch release number i.e. the w in x.y.zrw
+ */
+#define RTE_VER_PATCH_RELEASE 2
+
+/**
+ * Macro to compute a version number usable for comparisons
+ */
+#define RTE_VERSION_NUM(a,b,c,d) ((a) << 24 | (b) << 16 | (c) << 8 | (d))
+
+/**
+ * All version numbers in one to compare with RTE_VERSION_NUM()
+ */
+#define RTE_VERSION RTE_VERSION_NUM( \
+                       RTE_VER_MAJOR, \
+                       RTE_VER_MINOR, \
+                       RTE_VER_PATCH_LEVEL, \
+                       RTE_VER_PATCH_RELEASE)
 
 /**
  * Extra string to be appended to version number,
@@ -73,7 +92,7 @@ extern "C" {
 #define RTE_VER_SUFFIX ""
 
 /**
- * Function returning string of version number: "RTE x.y.z"
+ * Function returning string of version number: "RTE x.y.zrw"
  * @return
  *     string
  */
@@ -83,13 +102,15 @@ rte_version(void) {
                return RTE_VER_PREFIX" "
                                RTE_STR(RTE_VER_MAJOR)"."
                                RTE_STR(RTE_VER_MINOR)"."
-                               RTE_STR(RTE_VER_PATCH_LEVEL)
+                               RTE_STR(RTE_VER_PATCH_LEVEL)"r"
+                               RTE_STR(RTE_VER_PATCH_RELEASE)
                                "-"RTE_VER_SUFFIX;
        else
                return RTE_VER_PREFIX" "
                                RTE_STR(RTE_VER_MAJOR)"."
                                RTE_STR(RTE_VER_MINOR)"."
-                               RTE_STR(RTE_VER_PATCH_LEVEL);
+                               RTE_STR(RTE_VER_PATCH_LEVEL)"r"
+                               RTE_STR(RTE_VER_PATCH_RELEASE);
 }
 
 #ifdef __cplusplus