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 5FE854592F;
	Sat,  7 Sep 2024 16:55:35 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 9FA6340659;
	Sat,  7 Sep 2024 16:55:14 +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 1810640657
 for <dev@dpdk.org>; Sat,  7 Sep 2024 16:55:13 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1725720912;
 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=WShofEzDzsqAKFEIYukYCh6tlmTrtueBv/MUw+787YE=;
 b=byz/33taD2AKoC4/M79P2ND7PgDE6b+rja/gty5ofCjKlB7Dyv4mj0wV4LUcxOpBOEumXI
 Rztj5zziBbZJdmGJziih9SnenV25bROwNjLL8+uM4qwsn+CD7ZBpYdHOkyyTwKWdJJiC5S
 gbqSVHILJXBgYOD1ndPoegHfw+G+9E0=
Received: from mx-prod-mc-01.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-478-kl63Xx5ONmuf_1dr4IB5Ng-1; Sat,
 07 Sep 2024 10:55:11 -0400
X-MC-Unique: kl63Xx5ONmuf_1dr4IB5Ng-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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS
 id F0B4B19560B2; Sat,  7 Sep 2024 14:55:09 +0000 (UTC)
Received: from dmarchan.redhat.com (unknown [10.45.226.65])
 by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP
 id 60F491956048; Sat,  7 Sep 2024 14:55:08 +0000 (UTC)
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>,
	Jian Wang <jianwang@trustnetic.com>
Subject: [PATCH 07/11] net/txgbe: move wrapper to base driver
Date: Sat,  7 Sep 2024 16:54:27 +0200
Message-ID: <20240907145433.1479091-8-david.marchand@redhat.com>
In-Reply-To: <20240907145433.1479091-1-david.marchand@redhat.com>
References: <20240907145433.1479091-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

BP_LOG() is only used in the base driver.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/txgbe/base/txgbe_osdep.h | 8 ++++++++
 drivers/net/txgbe/txgbe_logs.h       | 7 -------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_osdep.h b/drivers/net/txgbe/base/txgbe_osdep.h
index 62d16a6abb..91c8abf12e 100644
--- a/drivers/net/txgbe/base/txgbe_osdep.h
+++ b/drivers/net/txgbe/base/txgbe_osdep.h
@@ -28,6 +28,14 @@
 #define TMZ_VADDR(mz)  ((mz)->addr)
 #define TDEV_NAME(eth_dev)  ((eth_dev)->device->name)
 
+extern int txgbe_logtype_bp;
+#define RTE_LOGTYPE_TXGBE_BP txgbe_logtype_bp
+#define BP_LOG(fmt, ...) \
+	RTE_LOG(DEBUG, TXGBE_BP, \
+		"[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
+		usec_stamp() / 1000000, usec_stamp() % 1000000, \
+		__func__, __LINE__, ## __VA_ARGS__)
+
 #define ASSERT(x) do {			\
 	if (!(x))			\
 		PMD_DRV_LOG(ERR, "TXGBE: %d", x);	\
diff --git a/drivers/net/txgbe/txgbe_logs.h b/drivers/net/txgbe/txgbe_logs.h
index 74f49ab9ef..b5a5a9233f 100644
--- a/drivers/net/txgbe/txgbe_logs.h
+++ b/drivers/net/txgbe/txgbe_logs.h
@@ -51,11 +51,4 @@ extern int txgbe_logtype_tx_free;
 #define DEBUGOUT(fmt, args...)    PMD_DRV_LOG(DEBUG, fmt, ##args)
 #define PMD_INIT_FUNC_TRACE()     PMD_DRV_LOG(DEBUG, ">>")
 
-extern int txgbe_logtype_bp;
-#define BP_LOG(fmt, args...) \
-	rte_log(RTE_LOG_DEBUG, txgbe_logtype_bp, \
-		"[%"PRIu64".%"PRIu64"]%s(%d): " fmt, \
-		usec_stamp() / 1000000, usec_stamp() % 1000000, \
-		__func__, __LINE__, ##args)
-
 #endif /* _TXGBE_LOGS_H_ */
-- 
2.46.0