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 D4AA845946; Mon, 9 Sep 2024 08:18:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 71C60402BE; Mon, 9 Sep 2024 08:18:47 +0200 (CEST) Received: from smtpbg156.qq.com (smtpbg156.qq.com [15.184.82.18]) by mails.dpdk.org (Postfix) with ESMTP id 77D3A402A8 for ; Mon, 9 Sep 2024 08:18:44 +0200 (CEST) X-QQ-mid: Yeas1t1725862717t629t20728 Received: from 3DB253DBDE8942B29385B9DFB0B7E889 (jiawenwu@trustnetic.com [125.118.31.67]) X-QQ-SSF: 00400000000000F0FVF000000000000 From: =?utf-8?b?Smlhd2VuIFd1?= X-BIZMAIL-ID: 7598307612964304189 To: "'David Marchand'" , Cc: "'Jian Wang'" References: <20240907145433.1479091-1-david.marchand@redhat.com> <20240907145433.1479091-8-david.marchand@redhat.com> In-Reply-To: <20240907145433.1479091-8-david.marchand@redhat.com> Subject: RE: [PATCH 07/11] net/txgbe: move wrapper to base driver Date: Mon, 9 Sep 2024 14:18:36 +0800 Message-ID: <063301db0280$1acf6330$506e2990$@trustnetic.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: zh-cn Thread-Index: AQLcvYcF/7dr0bnPqAP299K7b2kveQHui7JjsDwPvRA= X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz8a-1 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 On Sat, Sep 7, 2024 10:54 PM, David Marchand wrote: > BP_LOG() is only used in the base driver. > > Signed-off-by: David Marchand > --- > 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 > Hi, Does this have to change? It looks a little weird.