From patchwork Wed Sep 21 22:08:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 9344275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 342B3607D4 for ; Wed, 21 Sep 2016 22:09:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FE6F2A1A7 for ; Wed, 21 Sep 2016 22:09:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14A802A4BE; Wed, 21 Sep 2016 22:09:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C19BB2A1A7 for ; Wed, 21 Sep 2016 22:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933076AbcIUWJA (ORCPT ); Wed, 21 Sep 2016 18:09:00 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:54191 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755279AbcIUWIz (ORCPT ); Wed, 21 Sep 2016 18:08:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=+QLtXrt/HrW8MBWK6xedbo6x2IxN/2CWFybDK/yZ8nI=; b=JXishlNoOjbiyhg0l+zkpEmOH7nl5k45jgzHKkCW+Ki5Lkr6veNtiH2lYGSqcVk/kMXfKadBveItpAYpI/o9lVPWcN/By5hMLpn5ZPb3tvzbIixuUfWq92eYL8fxZUoKY4hcwlA3GMrKdNkWpgseNswwxl0zexEhCNQHPXr/5AY=; Received: from [10.0.0.151] (helo=jggl.edm.orcorp.ca) by quartz.orcorp.ca with esmtps (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bmphF-0003vd-Uz; Wed, 21 Sep 2016 16:08:53 -0600 From: Jason Gunthorpe To: linux-rdma@vger.kernel.org Cc: Yishai Hadas Subject: [PATCH 04/23] mlx5: Add cmake options to replace --with-mlx5_debug/mw_debug Date: Wed, 21 Sep 2016 16:08:30 -0600 Message-Id: <1474495729-17604-5-git-send-email-jgunthorpe@obsidianresearch.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1474495729-17604-1-git-send-email-jgunthorpe@obsidianresearch.com> References: <1474495729-17604-1-git-send-email-jgunthorpe@obsidianresearch.com> X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.151 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Simply enable -D flags when building. Use as: $ cmake -DMLX5_DEBUG=TRUE -DMLX5_MW_DEBUG=TRUE Reported-by: Yishai Hadas Signed-off-by: Jason Gunthorpe --- libmlx5/src/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libmlx5/src/CMakeLists.txt b/libmlx5/src/CMakeLists.txt index a34a8063eeb2..44df83b47d96 100644 --- a/libmlx5/src/CMakeLists.txt +++ b/libmlx5/src/CMakeLists.txt @@ -1,3 +1,15 @@ +set(MLX5_DEBUG "FALSE" CACHE BOOL + "Enable expensive runtime logging options for the mlx5 verbs provider") +if (MLX5_DEBUG) + add_definitions("-DMLX5_DEBUG") +endif() + +set(MLX5_MW_DEBUG "FALSE" CACHE BOOL + "Enable extra validation of memory windows for the mlx5 verbs provider") +if (MLX5_MW_DEBUG) + add_definitions("-DMW_DEBUG") +endif() + rdma_provider(mlx5 buf.c cq.c