summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--VNFs/DPPD-PROX/Makefile11
-rw-r--r--VNFs/DPPD-PROX/main.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/Makefile b/VNFs/DPPD-PROX/Makefile
index ff75c178..60cea67f 100644
--- a/VNFs/DPPD-PROX/Makefile
+++ b/VNFs/DPPD-PROX/Makefile
@@ -214,12 +214,15 @@ SRCS-y += stats_latency.c stats_global.c stats_core.c stats_task.c stats_prio.c
SRCS-y += cmd_parser.c input.c prox_shared.c prox_lua_types.c
SRCS-y += genl4_bundle.c heap.c genl4_stream_tcp.c genl4_stream_udp.c cdf.c
SRCS-y += stats.c stats_cons_log.c stats_cons_cli.c stats_parser.c hash_set.c prox_lua.c prox_malloc.c prox_ipv6.c prox_compat.c
+SRCS-y += git_version.c
+
+GIT_VERSION := "$(shell git describe --abbrev=8 --dirty --always)"
ifeq ($(FIRST_PROX_MAKE),)
MAKEFLAGS += --no-print-directory
FIRST_PROX_MAKE = 1
export FIRST_PROX_MAKE
-all: libedit_autoconf.h
+all: libedit_autoconf.h git_version.c
@./helper-scripts/trailing.sh
@$(MAKE) $@
clean:
@@ -246,6 +249,12 @@ libedit_autoconf.h: $(AUTO-CONFIG-SCRIPT)
> /dev/null
# auto-conf adds empty line at the end of the file, considered as error by trailing.sh script
$(Q) sed -i '$$ d' '$@'
+
+git_version.c: force
+ @echo 'const char *git_version=$(GIT_VERSION);' | cmp -s - $@ || echo 'const char *git_version=$(GIT_VERSION);' > $@
+ @echo $@
+force:
+
else
include $(RTE_SDK)/mk/rte.extapp.mk
endif
diff --git a/VNFs/DPPD-PROX/main.c b/VNFs/DPPD-PROX/main.c
index aeee288b..5d01845e 100644
--- a/VNFs/DPPD-PROX/main.c
+++ b/VNFs/DPPD-PROX/main.c
@@ -54,6 +54,7 @@
#endif
uint8_t lb_nb_txrings = 0xff;
+extern const char *git_version;
struct rte_ring *ctrl_rings[RTE_MAX_LCORE*MAX_TASKS_PER_CORE];
static void __attribute__((noreturn)) prox_usage(const char *prgname)
@@ -1218,6 +1219,7 @@ int main(int argc, char **argv)
plog_init(prox_cfg.log_name, prox_cfg.log_name_pid);
plog_info("=== " PROGRAM_NAME " %s ===\n", VERSION_STR());
plog_info("\tUsing DPDK %s\n", rte_version() + sizeof(RTE_VER_PREFIX));
+ plog_info("\tgit version %s\n", git_version);
set_term_env();
read_rdt_info();