From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 070AD4596C;
	Thu, 12 Sep 2024 10:27:33 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id EA21D410DD;
	Thu, 12 Sep 2024 10:27:18 +0200 (CEST)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [170.10.133.124])
 by mails.dpdk.org (Postfix) with ESMTP id 4D45D410D4
 for <dev@dpdk.org>; Thu, 12 Sep 2024 10:27:17 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1726129636;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=SKTXjSPLvgoPZo4h8XDl6cQy7/ULOTIczP3qXSDS12Q=;
 b=D69rI5CKXo006+n/ZU9SYe8QzoNf+i9cTyN4AbDZdyrSrKSR64NxHAXXKWV31Qbm68yvHP
 CCuYgUwrj/y46RW2bddGPwtECcwjm8B5XfyXvsAZPIa55Wg/cVP7RBjb572dtebMePfXzM
 vR2wubh7zvDZIUXB0ygcmpeaAxNEG8s=
Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com
 (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by
 relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,
 cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-cWfHgjLFMiiTqSLzMFENyw-1; Thu,
 12 Sep 2024 04:27:13 -0400
X-MC-Unique: cWfHgjLFMiiTqSLzMFENyw-1
Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com
 (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS
 id 8BE461953951; Thu, 12 Sep 2024 08:27:12 +0000 (UTC)
Received: from dmarchan.redhat.com (unknown [10.45.224.230])
 by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP
 id AFBA81956053; Thu, 12 Sep 2024 08:27:10 +0000 (UTC)
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
 Vijay Kumar Srivastava <vsrivast@xilinx.com>
Subject: [PATCH v2 05/14] drivers: reuse default logtype for SFC drivers
Date: Thu, 12 Sep 2024 10:26:31 +0200
Message-ID: <20240912082643.1532679-6-david.marchand@redhat.com>
In-Reply-To: <20240912082643.1532679-1-david.marchand@redhat.com>
References: <20240907145433.1479091-1-david.marchand@redhat.com>
 <20240912082643.1532679-1-david.marchand@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="US-ASCII"; x-default=true
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Nothing is fixed here, just reuse the value coming from the build
framework rather than use a fixed string that may get wrong in the
future.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/sfc/sfc_log.h       | 7 ++-----
 drivers/vdpa/sfc/sfc_vdpa_log.h | 7 ++-----
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/net/sfc/sfc_log.h b/drivers/net/sfc/sfc_log.h
index 10a9ce6ced..b92b358927 100644
--- a/drivers/net/sfc/sfc_log.h
+++ b/drivers/net/sfc/sfc_log.h
@@ -13,9 +13,6 @@
 /** Generic driver log type */
 extern int sfc_logtype_driver;
 
-/** Common log type name prefix */
-#define SFC_LOGTYPE_PREFIX	"pmd.net.sfc."
-
 /** Log PMD generic message, add a prefix and a line break */
 #define SFC_GENERIC_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, sfc_logtype_driver,			\
@@ -23,10 +20,10 @@ extern int sfc_logtype_driver;
 			RTE_FMT_TAIL(__VA_ARGS__ ,)))
 
 /** Name prefix for the per-device log type used to report basic information */
-#define SFC_LOGTYPE_MAIN_STR	SFC_LOGTYPE_PREFIX "main"
+#define SFC_LOGTYPE_MAIN_STR	RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main"
 
 /** Device MCDI log type name prefix */
-#define SFC_LOGTYPE_MCDI_STR	SFC_LOGTYPE_PREFIX "mcdi"
+#define SFC_LOGTYPE_MCDI_STR	RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi"
 
 #define SFC_LOG_PREFIX_MAX	32
 
diff --git a/drivers/vdpa/sfc/sfc_vdpa_log.h b/drivers/vdpa/sfc/sfc_vdpa_log.h
index 6c0101dbb4..1104e7de43 100644
--- a/drivers/vdpa/sfc/sfc_vdpa_log.h
+++ b/drivers/vdpa/sfc/sfc_vdpa_log.h
@@ -8,9 +8,6 @@
 /** Generic driver log type */
 extern int sfc_vdpa_logtype_driver;
 
-/** Common log type name prefix */
-#define SFC_VDPA_LOGTYPE_PREFIX	"pmd.vdpa.sfc."
-
 /** Log PMD generic message, add a prefix and a line break */
 #define SFC_VDPA_GENERIC_LOG(level, ...) \
 	rte_log(RTE_LOG_ ## level, sfc_vdpa_logtype_driver,		\
@@ -18,10 +15,10 @@ extern int sfc_vdpa_logtype_driver;
 			RTE_FMT_TAIL(__VA_ARGS__ ,)))
 
 /** Name prefix for the per-device log type used to report basic information */
-#define SFC_VDPA_LOGTYPE_MAIN_STR	SFC_VDPA_LOGTYPE_PREFIX "main"
+#define SFC_VDPA_LOGTYPE_MAIN_STR	RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".main"
 
 /** Device MCDI log type name prefix */
-#define SFC_VDPA_LOGTYPE_MCDI_STR	SFC_VDPA_LOGTYPE_PREFIX "mcdi"
+#define SFC_VDPA_LOGTYPE_MCDI_STR	RTE_STR(RTE_LOG_DEFAULT_LOGTYPE) ".mcdi"
 
 #define SFC_VDPA_LOG_PREFIX_MAX	32
 
-- 
2.46.0