From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 91A3E4596C; Thu, 12 Sep 2024 10:27:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AE08410D4; Thu, 12 Sep 2024 10:27:25 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E577B41060 for ; Thu, 12 Sep 2024 10:27:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726129643; 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=FEoyZHQcH8rNixNgRhm+1OA/sRHpLlx7sKDbrYu1xuc=; b=YnLmTG/WwVX4PgXj7SYn9ROCLe2snAGj7pH3Jv7B+6Lc+DsiykJ70IakJExFCgvfMF9ipz l1mQ1pV+rMEpDx/OhAWsvizqgFTr7o6e123/LAJ0bxmGzKwpCivyiakIrC2mozVpMe8119 NbRNk+H/JqQy4x+zC43TcIGg6sehWgY= 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-307-QBQCQV3lMwy5PYlHj10xQA-1; Thu, 12 Sep 2024 04:27:22 -0400 X-MC-Unique: QBQCQV3lMwy5PYlHj10xQA-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 056A41955D45; Thu, 12 Sep 2024 08:27:21 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.230]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D9E83000235; Thu, 12 Sep 2024 08:27:18 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: Jiawen Wu , Jian Wang Subject: [PATCH v2 07/14] net/txgbe: move wrapper to base driver Date: Thu, 12 Sep 2024 10:26:33 +0200 Message-ID: <20240912082643.1532679-8-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.4.1 on 10.30.177.4 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org BP_LOG() is only used in the base driver. Signed-off-by: David Marchand Acked-by: Jiawen Wu --- 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