DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Chenbo Xia <chenbo.xia@intel.com>,
	Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [PATCH v8 4/6] vhost: use logtype instead of RTE_LOGTYPE_USER1
Date: Mon, 14 Aug 2023 09:31:23 -0700	[thread overview]
Message-ID: <20230814163125.63033-5-stephen@networkplumber.org> (raw)
In-Reply-To: <20230814163125.63033-1-stephen@networkplumber.org>

Fix instances of USER1 logtype in fdset and crypto
sections.

Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/vhost/fd_man.c       |  4 ++--
 lib/vhost/vhost_crypto.c | 22 +++++++++++-----------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/lib/vhost/fd_man.c b/lib/vhost/fd_man.c
index 1876fada3354..46037d02784e 100644
--- a/lib/vhost/fd_man.c
+++ b/lib/vhost/fd_man.c
@@ -10,8 +10,8 @@
 
 #include "fd_man.h"
 
-
-#define RTE_LOGTYPE_VHOST_FDMAN RTE_LOGTYPE_USER1
+RTE_LOG_REGISTER_SUFFIX(vhost_fdset_logtype, fdset, INFO);
+#define RTE_LOGTYPE_VHOST_FDMAN vhost_fdset_logtype
 
 #define FDPOLLERR (POLLERR | POLLHUP | POLLNVAL)
 
diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index 9bf5ef67b9ad..3e1ef1ac25eb 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -4,6 +4,7 @@
 #include <rte_malloc.h>
 #include <rte_hash.h>
 #include <rte_jhash.h>
+#include <rte_log.h>
 #include <rte_mbuf.h>
 #include <rte_cryptodev.h>
 
@@ -16,22 +17,21 @@
 #define IV_OFFSET		(sizeof(struct rte_crypto_op) + \
 				sizeof(struct rte_crypto_sym_op))
 
-#ifdef RTE_LIBRTE_VHOST_DEBUG
+RTE_LOG_REGISTER_SUFFIX(vhost_crypto_logtype, crypto, INFO);
+#define RTE_LOGTYPE_VHOST_CRYPTO	vhost_crypto_logtype
+
 #define VC_LOG_ERR(fmt, args...)				\
-	RTE_LOG(ERR, USER1, "[%s] %s() line %u: " fmt "\n",	\
-		"Vhost-Crypto",	__func__, __LINE__, ## args)
+	RTE_LOG(ERR, VHOST_CRYPTO, "%s() line %u: " fmt "\n",	\
+		__func__, __LINE__, ## args)
 #define VC_LOG_INFO(fmt, args...)				\
-	RTE_LOG(INFO, USER1, "[%s] %s() line %u: " fmt "\n",	\
-		"Vhost-Crypto",	__func__, __LINE__, ## args)
+	RTE_LOG(INFO, VHOST_CRYPTO, "%s() line %u: " fmt "\n",	\
+		__func__, __LINE__, ## args)
 
+#ifdef RTE_LIBRTE_VHOST_DEBUG
 #define VC_LOG_DBG(fmt, args...)				\
-	RTE_LOG(DEBUG, USER1, "[%s] %s() line %u: " fmt "\n",	\
-		"Vhost-Crypto",	__func__, __LINE__, ## args)
+	RTE_LOG(DEBUG, VHOST_CRYPTO, "%s() line %u: " fmt "\n",	\
+		__func__, __LINE__, ## args)
 #else
-#define VC_LOG_ERR(fmt, args...)				\
-	RTE_LOG(ERR, USER1, "[VHOST-Crypto]: " fmt "\n", ## args)
-#define VC_LOG_INFO(fmt, args...)				\
-	RTE_LOG(INFO, USER1, "[VHOST-Crypto]: " fmt "\n", ## args)
 #define VC_LOG_DBG(fmt, args...)
 #endif
 
-- 
2.39.2


  parent reply	other threads:[~2023-08-14 16:32 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08  4:48 [PATCH 0/5] Fix use of RTE_LOGTYPE_USER1 in libraries Stephen Hemminger
2023-02-08  4:48 ` [PATCH 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-08 23:52   ` Konstantin Ananyev
2023-02-08  4:48 ` [PATCH 2/5] reorder: " Stephen Hemminger
2023-02-08  4:48 ` [PATCH 3/5] latencystats: use " Stephen Hemminger
2023-02-08  4:48 ` [PATCH 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-09  7:19   ` Xia, Chenbo
2023-02-08  4:48 ` [PATCH 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-10  0:22 ` [PATCH v3 0/5] Replace use of RTE_LOGTYPE_USER1 in library Stephen Hemminger
2023-02-10  0:22   ` [PATCH v3 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-10  0:22   ` [PATCH v3 2/5] reorder: " Stephen Hemminger
2023-02-10  0:22   ` [PATCH v3 3/5] latencystats: use " Stephen Hemminger
2023-02-10  0:22   ` [PATCH v3 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-10  9:58     ` Maxime Coquelin
2023-02-10  0:22   ` [PATCH v3 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-10 17:15 ` [PATCH v4 0/5] Replace use of RTE_LOGTYPE_USER1 in library Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 2/5] reorder: " Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 3/5] latencystats: use " Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-10 17:15   ` [PATCH v4 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-12 16:14 ` [PATCH 0/5] Replace us of RTE_LOGTYPE_USER1 in libraries Stephen Hemminger
2023-02-12 16:14   ` [PATCH 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-12 16:14   ` [PATCH 2/5] reorder: " Stephen Hemminger
2023-02-12 16:14   ` [PATCH 3/5] latencystats: use " Stephen Hemminger
2023-02-12 16:14   ` [PATCH 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-12 16:14   ` [PATCH 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-20 18:49 ` [PATCH v6 0/5] Replace use of RTE_LOGTYPE_USER1 in libraries Stephen Hemminger
2023-02-20 18:49   ` [PATCH v6 1/5] ip_frag: use a dynamic logtype Stephen Hemminger
2023-02-21 10:41     ` David Marchand
2023-02-20 18:49   ` [PATCH v6 2/5] reorder: " Stephen Hemminger
2023-02-20 18:49   ` [PATCH v6 3/5] latencystats: use " Stephen Hemminger
2023-02-20 18:50   ` [PATCH v6 4/5] vhost: use logtype instead of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-02-21 10:39     ` David Marchand
2023-02-20 18:50   ` [PATCH v6 5/5] ipsec: fix usage " Stephen Hemminger
2023-02-21 10:42   ` [PATCH v6 0/5] Replace use of RTE_LOGTYPE_USER1 in libraries David Marchand
2023-02-21 18:46     ` Stephen Hemminger
2023-08-14 16:31 ` [PATCH v8 0/6] Convert " Stephen Hemminger
2023-08-14 16:31   ` [PATCH v8 1/6] ip_frag: use a dynamic logtype Stephen Hemminger
2023-12-01  8:10     ` David Marchand
2023-12-01 12:16       ` Konstantin Ananyev
2023-12-01 13:11         ` David Marchand
2023-08-14 16:31   ` [PATCH v8 2/6] reorder: " Stephen Hemminger
2023-08-16  8:29     ` [EXT] " Volodymyr Fialko
2023-08-14 16:31   ` [PATCH v8 3/6] latencystats: use " Stephen Hemminger
2023-08-14 16:31   ` Stephen Hemminger [this message]
2023-08-14 16:31   ` [PATCH v8 5/6] ipsec: fix usage of RTE_LOGTYPE_USER1 Stephen Hemminger
2023-08-14 16:31   ` [PATCH v8 6/6] power: use a dynamic logtype for guest channel Stephen Hemminger
2023-08-14 17:41   ` [PATCH v8 0/6] Convert use of RTE_LOGTYPE_USER1 in libraries Morten Brørup
2023-12-04 12:25   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230814163125.63033-5-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).