DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix version macro
@ 2021-03-17  9:31 Thomas Monjalon
  2021-03-17  9:48 ` David Marchand
  2021-03-17 15:36 ` David Marchand
  0 siblings, 2 replies; 8+ messages in thread
From: Thomas Monjalon @ 2021-03-17  9:31 UTC (permalink / raw)
  To: dev; +Cc: stable, David Marchand, Bruce Richardson

The macro RTE_VERSION is broken since updated with function calls.
It is a build-time version number, and must be built with macros.
For a run-time version number, there is the function rte_version().

Fixes: 5b637a848195 ("eal: fix querying DPDK version at runtime")
Cc: stable@dpdk.org

Reported-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 lib/librte_eal/include/rte_version.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/include/rte_version.h b/lib/librte_eal/include/rte_version.h
index 2f3f727b46..736c5703be 100644
--- a/lib/librte_eal/include/rte_version.h
+++ b/lib/librte_eal/include/rte_version.h
@@ -28,10 +28,10 @@ extern "C" {
  * All version numbers in one to compare with RTE_VERSION_NUM()
  */
 #define RTE_VERSION RTE_VERSION_NUM( \
-			rte_version_year(), \
-			rte_version_month(), \
-			rte_version_minor(), \
-			rte_version_release())
+			RTE_VER_YEAR, \
+			RTE_VER_MONTH, \
+			RTE_VER_MINOR, \
+			RTE_VER_RELEASE)
 
 /**
  * Function to return DPDK version prefix string
-- 
2.30.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-03-18 15:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17  9:31 [dpdk-dev] [PATCH] eal: fix version macro Thomas Monjalon
2021-03-17  9:48 ` David Marchand
2021-03-17 10:01   ` Thomas Monjalon
2021-03-18 12:28     ` Bruce Richardson
2021-03-18 14:41       ` Thomas Monjalon
2021-03-18 15:45         ` Bruce Richardson
2021-03-17 15:36 ` David Marchand
2021-03-17 15:39   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).