[dpdk-dev] [PATCH v1 15/17] vhost: replace library debug flag with global one

Lukasz Wojciechowski l.wojciechow at partner.samsung.com
Fri Apr 17 23:57:37 CEST 2020


Use global debug flag RTE_DEBUG instead of RTE_LIBRTE_VHOST_DEBUG.
The old define is completely removed from source code and config.

Signed-off-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
---
 config/common_base              | 1 -
 lib/librte_vhost/vhost.h        | 2 +-
 lib/librte_vhost/vhost_crypto.c | 2 +-
 lib/librte_vhost/vhost_user.c   | 2 +-
 4 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/config/common_base b/config/common_base
index 025ae7c62..1f7be1219 100644
--- a/config/common_base
+++ b/config/common_base
@@ -1031,7 +1031,6 @@ CONFIG_RTE_LIBRTE_PDUMP=y
 #
 CONFIG_RTE_LIBRTE_VHOST=n
 CONFIG_RTE_LIBRTE_VHOST_NUMA=n
-CONFIG_RTE_LIBRTE_VHOST_DEBUG=n
 
 #
 # Compile vhost PMD
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 2087d1400..ea44e3aa6 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -520,7 +520,7 @@ extern int vhost_data_log_level;
 		"VHOST_DATA : " fmt, ##args) :			\
 	 0)
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
+#ifdef RTE_DEBUG
 #define VHOST_MAX_PRINT_BUFF 6072
 #define PRINT_PACKET(device, addr, size, header) do { \
 	char *pkt_addr = (char *)(addr); \
diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index 68911972b..5648e5c34 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -16,7 +16,7 @@
 #define IV_OFFSET		(sizeof(struct rte_crypto_op) + \
 				sizeof(struct rte_crypto_sym_op))
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
+#ifdef RTE_DEBUG
 #define VC_LOG_ERR(fmt, args...)				\
 	RTE_LOG(ERR, USER1, "[%s] %s() line %u: " fmt "\n",	\
 		"Vhost-Crypto",	__func__, __LINE__, ## args)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index bd1be0104..dea334dfd 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -967,7 +967,7 @@ add_guest_pages(struct virtio_net *dev, struct rte_vhost_mem_region *reg,
 	return 0;
 }
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
+#ifdef RTE_DEBUG
 /* TODO: enable it only in debug mode? */
 static void
 dump_guest_pages(struct virtio_net *dev)
-- 
2.17.1



More information about the dev mailing list