From patchwork Fri Feb 5 00:29:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiong, Jianxin" X-Patchwork-Id: 12069021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4391C433DB for ; Fri, 5 Feb 2021 00:14:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EFEF64F97 for ; Fri, 5 Feb 2021 00:14:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EFEF64F97 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 66CDE6EEB0; Fri, 5 Feb 2021 00:14:16 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 63A416EEB0 for ; Fri, 5 Feb 2021 00:14:15 +0000 (UTC) IronPort-SDR: GyG6reuqTWUZS7BAI2dTnKYH0zY7KBXSvrv1ZIbuszjN6KlwSLyWmzK8drySr59VsGvaRWv6Oo yviDhSHJ74lw== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="266181543" X-IronPort-AV: E=Sophos;i="5.81,153,1610438400"; d="scan'208";a="266181543" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 16:14:14 -0800 IronPort-SDR: Em58YsvkWeHRtvoJS0C7LsMieIWhvViKA3Ys0SNYYfBhmrGjisR4YPcEK2IYInKVX9pWeWpATF gvbVX8hDo00w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,153,1610438400"; d="scan'208";a="508326481" Received: from cst-dev.jf.intel.com ([10.23.221.69]) by orsmga004.jf.intel.com with ESMTP; 04 Feb 2021 16:14:14 -0800 From: Jianxin Xiong To: linux-rdma@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH rdma-core v2 0/3] Dma-buf related fixes Date: Thu, 4 Feb 2021 16:29:11 -0800 Message-Id: <1612484954-75514-1-git-send-email-jianxin.xiong@intel.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yishai Hadas , Leon Romanovsky , John Hubbard , Edward Srouji , Emil Velikov , Gal Pressman , Ali Alnubani , Jason Gunthorpe , Doug Ledford , Daniel Vetter , Christian Koenig , Jianxin Xiong MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This is the second version of the patch series. Change log: v2: * Use pgk_check_modules() to check libdrm configuration instead of calling pkg-config directly * Put all the DRM header checking logic in CMakeLists.txt * Use a seperate source file for dma-buf allocation stubs * Remove the definition of HAVE_DRM_H from config.h * Add space between the acronym and the full name v1: https://www.spinics.net/lists/linux-rdma/msg99815.html * Fix compilation warnings for 32bit builds * Cosmetic improvement for dma-buf allocation routines * Add check for DRM headers This series fixes a few issues related to the dma-buf support. It consists of three patches. The first patch fixes a compilation warning for 32-bit builds. Patch 2 renames a function parameter and adds full name to an acronym. Patch 3 adds check for DRM headers. Pull request at github: https://github.com/linux-rdma/rdma-core/pull/942 Jianxin Xiong (3): verbs: Fix gcc warnings when building for 32bit systems pyverbs,tests: Cosmetic improvements for dma-buf allocation routines configure: Add check for the presence of DRM headers CMakeLists.txt | 15 +++++++++ libibverbs/cmd_mr.c | 2 +- libibverbs/verbs.c | 2 +- pyverbs/CMakeLists.txt | 14 ++++++-- pyverbs/dmabuf.pyx | 12 +++---- pyverbs/dmabuf_alloc.c | 20 ++++++------ pyverbs/dmabuf_alloc.h | 2 +- pyverbs/dmabuf_alloc_stub.c | 39 +++++++++++++++++++++++ pyverbs/mr.pyx | 6 ++-- tests/test_mr.py | 78 ++++++++++++++++++++++----------------------- 10 files changed, 127 insertions(+), 63 deletions(-) create mode 100644 pyverbs/dmabuf_alloc_stub.c