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 02FADA0567; Tue, 9 Mar 2021 10:48:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C59D522A493; Tue, 9 Mar 2021 10:48:55 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id C438222A443 for ; Tue, 9 Mar 2021 10:48:53 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 782805C00D9; Tue, 9 Mar 2021 04:48:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 09 Mar 2021 04:48:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=3Se3GeOxNt+e7 9fg3grJsMHrBxAKl5BFY5/ociXjq7g=; b=iSnpB76U3uDJ1r0owpGxmnS+5izv6 9JhjsJV0OmsZhBuO2T3/YHn7ui+vNtfkqm25ka155P2WNvh79H7cc7JV+yB9yUIj AAhf+2v1YHZ7CRtd54jixnBlnY5cRYHkNUGITfQZsr1xL8SZ3aSb9liFsdtRX+pL PLSmDfziWHkHpgunx+/XsGQlpmIHkQ6LYYnNelPX6hMNykUD/IRnZvhDZt8D4jb5 KYLGqkUVBoesajcZ6Dg7V7vaaADZXFqZ33seFM2uIYs/uL12WsxAgJMcv/sG5a9T N2AC4Xfhd5cNV5/mnx8IDXX9ZfMl5nekT+nAT2C+6FKQyJEvK37VrQbqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=3Se3GeOxNt+e79fg3grJsMHrBxAKl5BFY5/ociXjq7g=; b=wmw7hjoa tyVSYJHU+oQZheQD4nfC8G7xf5rV15BTCp5HWV2QsQ2g8P8W8H0V4vjJDyX+7p5T 9ZD8pMDfu/SUnOUl31rUEde6ucy1o1HIut5ns4djZ3OF8K9UX8dnknoVzOq7KtXd lEgzyStiELCvHkn9duw1XfYohFXN2ZZk9qMEgklitke+rzqh7wJPMcEE16FnE+Ti iJllD/qtHZGdemr2r724k8xwuu4Z4ggOB6AgVNnEdBLx5vmJGSWli3CSaF0F8TUv GEfg9BiGEh9cd8hLHODWzk08Hv95ZQ3iJcsor0ZO8fox3yJDWDVxh5L9mO7dFIaF 7cGs8glPF7y35Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudduiedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepheefieekleefieeljedtvdehgeejvdevfedufeetleejfeethfel gfffudektdeunecuffhomhgrihhnpehpmhgurdhnvghtnecukfhppeejjedrudefgedrvd dtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id BBF6D1080064; Tue, 9 Mar 2021 04:48:52 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Matan Azrad , Shahaf Shuler Date: Tue, 9 Mar 2021 10:48:33 +0100 Message-Id: <20210309094836.988763-2-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210309094836.988763-1-thomas@monjalon.net> References: <20210308222855.823670-1-thomas@monjalon.net> <20210309094836.988763-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/4] net/mlx4: enable debug logs dynamically 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 Sender: "dev" The macro DEBUG was doing nothing if not compiled with RTE_LIBRTE_MLX4_DEBUG. As it is not used in the data path, it can be always enabled at compilation time. Then it can be enabled at runtime with: --log-level pmd.net.mlx4:debug Signed-off-by: Thomas Monjalon --- drivers/net/mlx4/mlx4_utils.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h index b8769562ab..fca21fd79c 100644 --- a/drivers/net/mlx4/mlx4_utils.h +++ b/drivers/net/mlx4/mlx4_utils.h @@ -52,14 +52,13 @@ pmd_drv_log_basename(const char *s) __LINE__, \ __func__, \ RTE_FMT_TAIL(__VA_ARGS__,))) -#define DEBUG(...) PMD_DRV_LOG(DEBUG, __VA_ARGS__) #define MLX4_ASSERT(exp) RTE_VERIFY(exp) #define claim_zero(...) MLX4_ASSERT((__VA_ARGS__) == 0) #else /* RTE_LIBRTE_MLX4_DEBUG */ /* - * Like MLX4_ASSERT(), DEBUG() becomes a no-op and claim_zero() does not perform + * Like MLX4_ASSERT(), claim_zero() does not perform * any check when debugging is disabled. */ @@ -68,12 +67,12 @@ pmd_drv_log_basename(const char *s) RTE_FMT(MLX4_DRIVER_NAME ": " \ RTE_FMT_HEAD(__VA_ARGS__,) "\n", \ RTE_FMT_TAIL(__VA_ARGS__,))) -#define DEBUG(...) (void)0 #define MLX4_ASSERT(exp) RTE_ASSERT(exp) #define claim_zero(...) (__VA_ARGS__) #endif /* RTE_LIBRTE_MLX4_DEBUG */ +#define DEBUG(...) PMD_DRV_LOG(DEBUG, __VA_ARGS__) #define INFO(...) PMD_DRV_LOG(INFO, __VA_ARGS__) #define WARN(...) PMD_DRV_LOG(WARNING, __VA_ARGS__) #define ERROR(...) PMD_DRV_LOG(ERR, __VA_ARGS__) -- 2.30.1