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 AD97BA0566; Mon, 8 Mar 2021 23:29:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3208222A4EC; Mon, 8 Mar 2021 23:29:07 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id 1519622A4E3 for ; Mon, 8 Mar 2021 23:29:06 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id BCB9E5C0121; Mon, 8 Mar 2021 17:29:05 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Mon, 08 Mar 2021 17:29:05 -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=QGaGuKkwsb3hOB3LVCQlJW5AEvnz6 BodzpK7OoCkDvCgZNb9/N/ID52Hbv+UgcVJmN2RlMgD/GKC/uBhzsvzhdljzDuCo RA6Vu2JWw5EsbNUnDkYCZSrhKKJ0TlOkIKtnwiKampAKjRrVDl+Ngu5b++P/ANEs 0FmBXp3yIodv9ZvFDWEg7mY7dr6Z6y95J1LFkiTeD/zm4QYyZvarAdh5/soSAKRr uhMPRbXJt7fVsQQ3rTXybUKmGFb+VM11t0li9e60nRMIErJnhZ667A2u7oUSDbzN lxaOu/Oi87t/uUcc0IvLo3NktkcXDZStEXSaJU3ygDuPLJdOYjtO+4moA== 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=A+/ecbek byJhQaw5C4BVex38kPNuRgWunuFclsV1cn7azRiAzza8NwFuA15HwAmYnLuGQ09O sMeEwe53MM8Zp5dgckNxhs/Tq95exlPJ62cjX8SOvFTj9tjHdxbzKa2h0FRv+sRu UeVagL2I2yzVxWocECn2I7tH3PBjuu1h9xbqxVoB+FJHdeteBXaAErLhbN/jI6u8 iCx5c5z+aNJ8ulxWftuBdrf6GKTuaSknnuJFsTK/cG9iJCijg9+7bzuu3nyrEWcR pQB6rK08F9GDXW6b/apKIN7yIFSYv9d8CRo3N4yRt9VfLeYALZvP376kKGbwCCO6 VNi8mWgxThppkw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledruddugedgledvucetufdoteggodetrfdotf 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 2F0531080057; Mon, 8 Mar 2021 17:29:05 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Matan Azrad , Shahaf Shuler Date: Mon, 8 Mar 2021 23:28:53 +0100 Message-Id: <20210308222855.823670-2-thomas@monjalon.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210308222855.823670-1-thomas@monjalon.net> References: <20210308222855.823670-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 1/3] 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