From patchwork Wed Sep 21 15:44:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 9343793 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 912D26077A for ; Wed, 21 Sep 2016 16:02:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CAAB2A7E9 for ; Wed, 21 Sep 2016 16:02:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 615402A7EB; Wed, 21 Sep 2016 16:02:04 +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 5F5202A7EF for ; Wed, 21 Sep 2016 16:02:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933365AbcIUQCC (ORCPT ); Wed, 21 Sep 2016 12:02:02 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:46641 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933179AbcIUQCB (ORCPT ); Wed, 21 Sep 2016 12:02:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=obsidianresearch.com; s=rsa1; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=0xzfBZBSCM5Ty+apCXvoiJNKzL9xjPBMEZ1NY+mlJ4M=; b=IOs6BsRJYWPrdDsLt6bcg8OaHYxilNCPMbtGKfzb4HBa2YpMlYv7gT8+oZyNkFVlP3Zwu4h1ezH95Ebr0iY2/bkciBEtgU8iHrt4R6mN6MpS7TEs4lDeXx8WmonBzgGDiCEcDH/3t92FqwN+fx/aB6DoymO0o5d4esqiKsQ7MtY=; Received: from [10.0.0.151] (helo=jggl.edm.orcorp.ca) by quartz.orcorp.ca with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bmjh7-0006v2-Up; Wed, 21 Sep 2016 09:44:21 -0600 Received: from jgg by jggl.edm.orcorp.ca with local (Exim 4.84) (envelope-from ) id 1bmjh7-0004vn-NB; Wed, 21 Sep 2016 09:44:21 -0600 Date: Wed, 21 Sep 2016 09:44:21 -0600 From: Jason Gunthorpe To: Yishai Hadas Cc: linux-rdma@vger.kernel.org, alaa@mellanox.com, "yishaih@mellanox.com" , Doug Ledford Subject: Re: [PATCH 11/16] Remove the auto* based build systems Message-ID: <20160921154421.GA1510@obsidianresearch.com> References: <1474409425-15769-1-git-send-email-jgunthorpe@obsidianresearch.com> <1474409425-15769-12-git-send-email-jgunthorpe@obsidianresearch.com> <6e3d2ab0-7c86-fe1c-affd-b7fb9ba59c20@dev.mellanox.co.il> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6e3d2ab0-7c86-fe1c-affd-b7fb9ba59c20@dev.mellanox.co.il> User-Agent: Mutt/1.5.23 (2014-03-12) 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 On Wed, Sep 21, 2016 at 04:53:23PM +0300, Yishai Hadas wrote: > On 9/21/2016 1:10 AM, Jason Gunthorpe wrote: > >The unified cmake version provides the same functionality now. > > Can you explain how cmake preservers some compilation options which were > enabled per vendor ? for example with previous build system someone could > run configure of libmlx5 with --with-mlx5_debug, how can it be done now ? On option is to do the usual 'CPPFLAGS="-DMLX5_DEBUG" cmake ..' However we may as well document these options and provide a command line switch as follows: From f964f6be593b7ef362af3168bd3c6bc8640b976d Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Wed, 21 Sep 2016 09:42:16 -0600 Subject: [PATCH] mlx5: Add cmake options to replace --with-mlx5_debug/mw_debug 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 --- providers/mlx5/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/providers/mlx5/CMakeLists.txt b/providers/mlx5/CMakeLists.txt index a34a8063eeb2..44df83b47d96 100644 --- a/providers/mlx5/CMakeLists.txt +++ b/providers/mlx5/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